Status Code | Status Message | Symbol |
---|---|---|
100 | Continue | :continue |
101 | Switching Protocols | :switching_protocols |
102 | Processing | :processing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)viewDidLoad:(BOOL)animated { | |
[super viewDidLoad:animated]; | |
self.numberFormatter = [[NSNumberFormatter alloc] init]; | |
[self.numberFormatter setNumberStyle:NSNumberFormatterNoStyle]; | |
[self.numberFormatter setGroupingSize:2]; | |
[self.numberFormatter setGroupingSeparator:@":"]; | |
[self.numberFormatter setUsesGroupingSeparator:YES]; | |
[self.numberFormatter setMaximumFractionDigits:0]; | |
[self.numberFormatter setMinimumIntegerDigits:6]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get update | |
apt-get upgrade | |
apt-get dist-upgrade | |
# /var/run/reboot-required ? | |
adduser $USER | |
# usermod -a -G www-data $USER | |
# Setup ~/.ssh/authorized_keys | |
# /usr/sbin/visudo |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Alright, so this should automatically convert a given video into a gif called optimized_output.gif | |
# See here for explanation: https://github.com/lelandbatey/configDebDev/blob/master/helpFiles.txt#L113 | |
ffmpeg -i $1 out%04d.gif # Extracts each frame of the video as a single gif | |
convert -delay 4 out*.gif anim.gif # Combines all the frames into one very nicely animated gif. | |
convert -layers Optimize anim.gif optimized_output.gif # Optimizes the gif using imagemagick | |
# vvvvv Cleans up the leftovers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
description "Description goes here" | |
author "Your Name" | |
start on (local-filesystems and net-device-up) | |
stop on runlevel [!2345] | |
respawn | |
exec /path/to/compiled/binary -flag value -flag2 value2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 HUP (hang up) | |
2 INT (interrupt) | |
3 QUIT (quit) | |
6 ABRT (abort) | |
9 KILL (non-catchable, non-ignorable kill) | |
14 ALRM (alarm clock) | |
15 TERM (software termination signal) | |
PID -1 sends signal to all processes if superuser, just those belonging to the user otherwise. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://en.wikibooks.org/wiki/OpenSSH/Cookbook/SFTP | |
Subsystem sftp internal-sftp | |
Match Group sftp-users | |
ChrootDirectory /home | |
AllowTCPForwarding no | |
X11Forwarding no | |
ForceCommand internal-sftp -d %u | |
groupadd --system sftp-users |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get install postgresql-9.3 pgadmin3 postgresql-contrib-9.3 # contrib is needed for hstore | |
su - postgres | |
psql -p 5432 -c "\l" # check the collation column and note that (for ex. en_US.UTF8) | |
psql -p 5433 -c "\l" # If the collation is the same, continue. If not, recreate the 9.3 cluster with the following commands | |
# Recreate 9.3 cluster with collation from old 9.1 cluster | |
# pg_ctlcluster 9.3 main stop | |
# pg_dropcluster 9.3 main | |
# export LC_ALL="<old-clusters-collation>" # For ex. LC_ALL="en_US.UTF8" |