Skip to content

Instantly share code, notes, and snippets.

View genediazjr's full-sized avatar
🎱
foobar

Gene Diaz genediazjr

🎱
foobar
View GitHub Profile
@genediazjr
genediazjr / debian-tomcat.sh
Last active November 11, 2015 06:10
Tomcat port 80 on Debian
apt-get update
apt-get upgrade
apt-get install vim make g++ openjdk-7-jdk tomcat7 fastjar unzip
cd /usr/share/tomcat7/lib/
-----------------------------------------------------------------------------
jar xf catalina.jar org/apache/catalina/util/ServerInfo.properties
server.info=Apache
@genediazjr
genediazjr / debian-increase-memory.sh
Last active November 11, 2015 06:10
Increase Memory on Debian
dd if=/dev/zero of=/swapfile1 bs=1024 count=524288
mkswap /swapfile1
chown root:root /swapfile1
chmod 0600 /swapfile1
swapon /swapfile1
nano /etc/fstab
-----------------------------------------------------------------------------
/swapfile1 swap swap defaults 0 0
-----------------------------------------------------------------------------
@genediazjr
genediazjr / dynamodb-params.js
Last active November 11, 2015 06:13
DynamoDB JSON parameter templates
var createTable = {
TableName: 'STRING_VALUE', /* required */
ProvisionedThroughput: { /* required */
ReadCapacityUnits: 0, /* required */
WriteCapacityUnits: 0 /* required */
},
KeySchema: [ /* required */
{AttributeName: 'STRING_VALUE', KeyType: 'HASH | RANGE'}, /* required */
/* more items */
],
@genediazjr
genediazjr / dropbox_conflict_clean.sh
Last active November 11, 2015 06:13
delete all dropbox conflicts
cd dropbox
find . -type f -name "* conflicted *" -exec rm -f {} \;
[Collections]
each - error or no return;
map - return transformed values in array;
filter - return those that has passed;
reject - removes the values that have passed;
reduce - returns one value based on array values;
detect - returns first passed;
sortBy - returns sorted by a numeric value;
some - return true if one satisfies iterator;
every - return true if all satisfies iterator;
@genediazjr
genediazjr / debian-time-sync.sh
Created March 6, 2015 08:36
Keep server time updated
sudo apt-get install ntp
sudo nano /etc/ntp.conf
logfile /var/log/xntpd
driftfile /var/lib/ntp/ntp.drift
statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
@genediazjr
genediazjr / ISO3166-2.json
Created April 8, 2015 06:51
ISO 3166-2 Countries and smallest units (WIP)
{
"AD": {
"label": "Andorra",
"units": [
{
"code": "AD-07",
"label": "Escut d'Andorra la Vella.svg Andorra la Vella"
},
{
"code": "AD-02",

Keybase proof

I hereby claim:

  • I am genediazjr on github.
  • I am genediazjr (https://keybase.io/genediazjr) on keybase.
  • I have a public key whose fingerprint is 8D41 E3C8 4BC3 B215 55F8 B2ED 1CFB 146E 169C 4E41

To claim this, I am signing this object:

Verifying that +genediazjr is my blockchain ID. https://onename.com/genediazjr
@genediazjr
genediazjr / .bash_profile
Last active February 6, 2016 00:35 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management