This file contains hidden or 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
| # | |
| # pg->s3->heroku! - synch a local postgresdb to Heroku using an s3 bucket | |
| # | |
| BUCKET=s3://PUT_YOUR_DBNAME_HERE | |
| LOCALSYNC=s3sync | |
| DUMPNAME=db.dump | |
| APPNAME=PUT_YOUR_APPNAME_HERE | |
| BUCKETURL=https://s3.amazonaws.com/PUT_YOUR_LINK_HERE | |
| LOCAL_DB_UNAME=PUT_YOUR_LOCAL_DB_UNAME_HERE |
This file contains hidden or 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
| /* | |
| * sig.c - examining the return value of the signal function | |
| * | |
| * The signal function returns the pointer to the previous | |
| * handler for the signal. | |
| */ | |
| #include <stdio.h> /* for printf */ | |
| #include <signal.h> /* for signal */ | |
| #include <stdlib.h> /* for exit */ |
This file contains hidden or 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
| /* | |
| * determine a file's size with stat | |
| */ | |
| #include <sys/stat.h> /* for stat */ | |
| #include <stdio.h> /* for printf */ | |
| int main(int ac, char *av[]) | |
| { | |
| if ( ac < 2 ) return 0; |
This file contains hidden or 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
| /* | |
| * determine a file's size with lseek | |
| */ | |
| #include <unistd.h> /* for lseek */ | |
| #include <stdio.h> /* for printf */ | |
| #include <fcntl.h> /* for open */ | |
| int main(int ac, char *av[]) | |
| { |
This file contains hidden or 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
| # ============================================ | |
| # | |
| # netyet.sh - Announce, in English, when your | |
| # Internet connection is working | |
| # | |
| # You could also use: | |
| # | |
| # ping -i 60 -a 8.8.8.8 | |
| # | |
| # which will just ring the terminal bell once |
This file contains hidden or 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
| // Unix File Permissions - List all possible file permissions | |
| // Written to teach myself structs and enums in Swift | |
| // Jake Kara, September 2017 | |
| enum Permission:Int{ | |
| case None = 0 | |
| case Execute, // 1 | |
| Write, // 2 | |
| ExecuteWrite, // 1 + 2 = 3 |
This file contains hidden or 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
| # usage: ./appicon-resize.sh ORIGINAL_PNG.png | |
| ORIG=$1 | |
| function resize { | |
| convert $ORIG -resize $1 $(echo $ORIG | sed -e "s/.png/-$1.png/g") | |
| } | |
| resize 1024 | |
| resize 167 |
This file contains hidden or 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
| # | |
| # get unemployment rates for CT and US | |
| # Jake Kara, December 2017 | |
| # | |
| # get unemployment rate CSV because these excel links: | |
| # http://www1.ctdol.state.ct.us/lmi/unemploymentrate.asp | |
| # seem to work in non-IE browsers or pandas/requests lib | |
This file contains hidden or 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
| /******************************************************** | |
| * ipclass.c | |
| * | |
| * Demonstrate that the first significant bits | |
| * can be used to determine the address class | |
| * | |
| * | |
| * https://en.wikipedia.org/wiki/Classful_network | |
| *******************************************************/ | |
| #include <stdio.h> |
This file contains hidden or 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
| """ Hash a file supplied by argv[1] """ | |
| from sys import argv | |
| from hashlib import sha256 | |
| # Construct an sha256 algorith | |
| h256 = sha256() | |
| # Get the name of the file we want to hash | |
| fname = argv[1] |