I use multiple profiles on the OS/X to manage various clients' working environments and settings, including my own personal profile. I've been doing this on Linux just fine with the command line args ".desktop" shortcut files.
After some brief research, and to remember this in future, on OS/X it's as simple as creating a shortcut to the following command:
open /Applications/Google\ Chrome.app --args --profile-directory="Guest Profile"
So, I had done a system update in OpenSuSE, and noticed that there was a new annoying app "Discover" for KDE. Getting this uninstalled (and stay uninstalled) took a little bit of hunting and pecking, but the following worked for me.
First find out what the app is. If it's running on the machine in front of you, you can just do an xprop.
- run xprop and click the Discover window. Something like the following will return (with a bunch of other data): WM_CLASS(STRING) = "plasma-discover", "discover"
- Get the process name/ID while it's still running: ps aux |grep plasma-discover. You will see something like 'appstream://org.kde.discover.desktop'
- 'locate org.kde.discover.desktop' you will see '/usr/share/applications/org.kde.discover.desktop'
- rpm -qf /usr/share/applications/org.kde.discover.desktop to see what package controls it. In this case, it was: discover-5.12.6-lp126.96.36.199.x86_64
- 'sudo zypper rm discover': remove the discover app
- 'sudo zypper al discover': add a lock to the app, so it doesn't get installed again when you do an update
var last_login = "132022299384906985";
var high = last_login.substr(0,9);
var low = last_login.substr(9,2);
var epoch = (((parseInt(high) - 116444736) * 100) + parseInt(low) + 10800);
var millis = epoch * 1000;
// Not needed since source is UTC
// var localMillis = millis - (60000 * new Date().getTimezoneOffset());
+ ("00" + (lastLogon.getMonth()+1)).slice(-2)
+ ("00" + lastLogon.getDate()).slice(-2)
+ ("00" + (lastLogon.getHours())).slice(-2)
+ ("00"+ lastLogon.getMinutes()).slice(-2)
I rsync'd a directory and noticed that the gid 5100 was not in my Mac's /etc/group file. So I added the group using the normal method (System Preferences -> Users and Groups) and could not find a place to update the gid. I also checked /etc/group file and was at a loss.
This link helped: https://superuser.com/questions/214004/how-to-add-user-to-a-group-from-mac-os-x-command-line
Doing a quick man on dseditgroup, with the information from that post, changing a gid on a group can be done via the following command:
sudo dseditgroup -o edit -i 5100 MyNewLocalGroup
Sat, Sep. 15th, 2018, 07:02 am
So I was trying to run updatedb as a normal user to create a local database for myself. Basically, since my personal files would not be in the general database, I wanted to create a "~/.locate.db" and alias locate as a custom name (e.g.: mylocate) to use that database. But I kept running into a permissions error:
joe@delljoe:~> updatedb -U /home/joe/ -l0 -o /home/joe/.locate.db
updatedb: can not open a temporary file for `/home/joe/.locate.db'
Even running as root, would give me that error. I have spent months scouring the web, and they all point to that command being the correct command to create a local database.
I just found out apparmor was blocking the executable from reading/writing from anywhere except the system default directory.
So there are three options:
1) Disable it for mlocate completely
sudo aa-disable /usr/bin/locate
sudo aa-disable /usr/bin/updatedb
sudo mv /etc/apparmor.d/usr.bin.locate /etc/apparmor.d/usr.bin.locate.OLD
sudo mv /etc/apparmor.d/usr.bin.updatedb /etc/apparmor.d/usr.bin.updatedb.OLD
sudo touch /etc/apparmor.d/usr.bin.locate
sudo touch /etc/apparmor.d/usr.bin.updatedb
2) Tune or update /etc/apparmor.d/usr.bin.updatedb and /etc/appmarmor.d/usr.bin.locate to allow writing to certain locations. For example updatedb can write to /home/*/.locate.db etc. This is recommended for production multi-user environments. (I am just using my laptop. And I am lazy)
3) Disable apparmor completely for dev envs
So, instead of butt dialing, I ended up butt photographing or butt taking QuickNotes+.
The volume up and down buttons can be shortcuts to the QuickNotes+ (up) or the camera (down) by double clicking them EVEN WHILE the phone is LOCKED. So annoying.
Perhaps it's because I've been sick the last couple days, but it took forever to find out this information... to disable it just go to Settings -> General -> Shortcut Keys. Turn it off there.
When the phone is locked... it should be locked! Nothing should activate the phone if you don't put in the passphrase/key/etc.
I still love that LG keeps the headphone jack, so I'll give them a pass on that setting to be defaulted as "on". I actually switched to LG for the headphone jack.
So I find it really annoying that there are websites which block pasting of passwords.
Here's a way around it:
1) Manually (ff)
- Start the developer tools (F12)
- click on inspector
- click on the arrow next to the inspector
- click on the password field (to highlight the code)
- find and remove "onpaste=false"
2) Automatically, each time... (ff)
- Go to the about://config
- Enter "dom.events.clipboardevents.enabled" and switch it to false
3) Automatically, each time (Chrome)
- Use the "Don't F*ck With Paste" extension (with the "u" when searching for it)
So I was trying to encode a WAV file into Ogg Vorbis format. I kept getting the following error:
Skipping chunk of type "", length 0
Skipping chunk of type "", length 1635017060
Warning: Unexpected EOF in reading WAV header
ERROR: Input file "FOOBAR.WAV" is not a supported format
I checked the encoding:
> sndfile-info ./FOOBAR.WAV
File : FOOBAR.WAV
Length : 18391552
RIFF : 18391544
fmt : 484
Format : 0x1 => WAVE_FORMAT_PCM
Channels : 2
Sample Rate : 48000
Block Align : 4
Bit Width : 16
Bytes/sec : 192000
data : 18391040
Sample Rate : 48000
Frames : 4597760
Channels : 2
Format : 0x00010002
Sections : 1
Seekable : TRUE
Duration : 00:01:35.787
Signal Max : 18887 (-4.79 dB)
Oggenc assumes that the input will be 44.1k, since this is 48k, we need to tell oggenc to expect a 48k:
> oggenc -b 128 -r -R 48000 -o foobar.ogg FOOBAR.WAV
Encoding "FOOBAR.WAV" to
at approximate bitrate 128 kbps (VBR encoding enabled)
Encoding [ 0m01s so far] -
Done encoding file "foobar.ogg"
File length: 1m 35.0s
Elapsed time: 0m 01.4s
Average bitrate: 108.4 kb/s
We started getting this error for several erService global ID's associated with several services. There were recons going for these services but the endpoints were not reachable, so the recons got rescheduled internally. We deleted these services through the admin console, since the endpoints were no longer around. Apparently the recon got stuck in limbo. Every ten minutes the scheduler would want to go out and do a recon, but would fail because it couldn't find the service with the error noted above, then it would get rescheduled for 10 minutes.
After going through the typical, where else is this erGlobal id being used... ? No where. But it was reappearing with that error every ten minutes.
So this is kind of a hack, but got the job done. Create a dummy service of any type through the admin console, find the service in the ldap, and change its global id to the missing ID. It will fail, and the scheduler won't reschedule it. Error gone! :)
Exact Steps to fix:
1) create a dummy service (e.g. LDAP Service to keep it simple)
2) save the ldif of that service as a backup
3) change the erGlobalId of that service to the missing erGlobalId direct in TIM LDAP
4) edit the service in the admin console and change something (e.g. service name)
5) wait ten minutes until it runs again: note it might error out due to missing attributes because the original service might not match the service you created. But according to TIM that's an error, and it processed the request, so as far as TIM knows, it's done and won't resubmit it.
6) wait another ten minutes to confirm there are no errors
7) rinse, repeat for other missing erGlobalId's
8) delete the dummy service.
So I followed the most excellent guide for configuring Postfix to use Gmail SMTP server. The following link does a pretty good job of describing the steps for various distributions on How-To Forge: https://www.howtoforge.com/tutorial/configure-postfix-to-use-gmail-as-a-mail-relay The basic thing is to configure postfix to use a relay server, and authenticate with sasl_passwd file, using TLS to smtp.gmail.com:587.
Once I got that working, everything was great! I would send an email from my client through my server, or using Alpine from the terminal, and Postfix would use Google as the relay. Except for one thing... Google would rewrite my From to my gmail account. This kind of defeats the whole point of using Google as a relay (my ISP blocks port 25, and its relay is shutting down since they're getting out of the email business). I wanted to use my own custom domain email address to send email.
To fix this problem I found the following Google tech note: https://support.google.com/mail/answer/22370?hl=en
Basically, to send as your custom domain firstname.lastname@example.org you need to “verify” that you actually own that domain to google. This consists of adding a new email address to your gmail account (email@example.com) giving it your email server's address, port (25/587/465) and your credentials to your account on your email server. Google will email you at that address, through your own server, and send you a verification code. You enter the verification code, and it becomes an address that you can even use within gmail user interface (as a drop down, or default). [Note: it will NOT pull down your emails or anything, it's just to verify that you DO have an account on your own mail server.]
Once “verify”, when you use firstname.lastname@example.org through your own mail server with Gmail as the relay, it will not rewrite your from address.
Note: I assume that you can add more emails like “postmaster@” or “apache@” by adding more to your gmail account, in case you have an application that needs to send email outside of your own server as itself. But all those system email addresses get routed locally to my own account.
Note: To configure gmail authentication if you have two-factor you will need an “App Password” else “Enable less secure apps” feature.