Skip to content

Instantly share code, notes, and snippets.

View davidcelis's full-sized avatar
Verified account

David Celis davidcelis

Verified account
View GitHub Profile
@davidcelis
davidcelis / crazy_email.markdown
Last active October 2, 2015 17:38
Crazy email I got

This is a really weird email that I received on April 1st, 2012 from an unknown sender 233558938299@dysgo.org. The email passed by Google's spam filters and found its way directly into my inbox. At first, I thought it was an elaborate April Fool's Day prank. Maybe it is. However, a tiny bit of research into the email address shows that people believe this to be a mass email sent periodically by a paranoid schizophrenic man from Japan. The email consisted only of the following 100 images arranged in this order. The text of the last image can be found at the end.

image image image image image image image image

#!/usr/bin/env zsh
#
# Works best with blinking text; the last heart will blink
# when you have less than 25% of your battery life remaining.
FULL="$(cat /sys/class/power_supply/BAT0/charge_full)"
NOW="$(cat /sys/class/power_supply/BAT0/charge_now)"
BATTERY=$(echo "scale=25;$NOW/$FULL" | bc)
if [[ $BATTERY -lt .25 ]]; then
@kyleslattery
kyleslattery / darksky.coffee
Created January 10, 2013 03:25
Hubot script for getting current weather/forecast from Dark Sky
# Description
# Grabs the current forecast from Dark Sky
#
# Dependencies
# None
#
# Configuration
# HUBOT_DARK_SKY_API_KEY
# HUBOT_DARK_SKY_DEFAULT_LOCATION
#
@postmodern
postmodern / gemcutter_rce.rb
Created January 30, 2013 18:35
Proof-of-Concept (PoC) exploit for Gemcutter utilizing the YAML deserialization vulnerability.
#!/usr/bin/env ruby
#
# Proof-of-Concept RCE exploit against Gemcutter
#
# ## Advisory
#
# * TBA
#
# ## Caveats
#
@davidcelis
davidcelis / 2013_Ruby_on_Ales_notes.md
Last active December 14, 2015 15:39
Ruby on Ales 2013 — Conference Notes

Table of Contents

[The End of Fun][end-of-fun] ([@sarahmei][@sarahmei])

[Hacking Cognition][hacking-cognition] ([@1773807][@1337807])

[Services and Rails][services-and-rails] ([@brianxq3][@brianxq3])

[How Ruby Makes Better Beer][better-beer] ([@cadwallion][@cadwallion])

module CheapStrings
def `(str)
str
end
end
module A
extend CheapStrings
def self.make_lots_of_strings
#!/usr/bin/env ruby
#
# This script can be used to check the in-store availability of the iPhone 5S.
# By default, it searches for all AT&T models. You can change this by editing
# the MY_DEVICES array below. While the Apple API supports searching for
# multiple devices at once, there is a limit.
#
# Once you have properly configured the MY_DEVICES array, you can run this script
# from the terminal. It takes a single parameter, which should be the zip code you
# wish to use for your search.
@xaviershay
xaviershay / build_frontend.sh
Last active December 24, 2015 20:49
SASS + Coffee + Concatenation in prod
#!/bin/bash
set -exo pipefail
BUILD_ENV=$1
if [ `uname` == 'Darwin' ]; then
OSX=1
JSCOMPRESSOR="yuicompressor --type js"
else
OSX=
@aredridel
aredridel / boot-coreos.sh
Last active January 4, 2016 18:12
Set up and boot CoreOS on top of a stock DigitalOcean Fedora 19 install. Abuses the Fedora 19 root as the CoreOS STATE partition. Still todo: copy SSH keys from Fedora install.
#!/bin/sh
kexec --load /boot/coreos_production_pxe.vmlinuz --initrd=/boot/coreos_production_pxe_image.cpio.gz --append='state=/dev/vda root=squashfs: sshkey="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAEAQCZ3fvhC7StXFdFRuXApBuXyS2phoH7ZVKMUMOi3DrbnZWC01GUq74WdalRDHtfq2dl0CPctLb8RHSD+/dKgWEH0gmoEOCio09ZAY5Ui4Cy+0cCGefXkUnJR4lgNOYD076BXjJwsCVCD8sMlFFT08Qn4/voP0jpL1uvvoWiC1KSvSjZf7sP/hRgsO633OuclXyVVq7mC6q+2QVg6hfO49Gt7TVXb+8lc8aUHAYyrXEVag6oICWqxWlSglbEpXCXhK4RB1f8h2vCaEPe2Kf1LNPYJ3dN5H5v+tnst9oZbFjo/qNSm4RvPBb3nsNARdcemdGcwiTjAiIn9gMxBMOyiYOYSgVwGd2U76FR0/RUFUORprynn6uebBhtpGzIAuFsUygMAPAM2tocO+t+h8AQviF6IeA9rKwf5bFTXV9HLy+iUoCWsVBmGypfGbsD7UNg3DIpXv4FdoLDDiCq+OV16ludjLk5pjknshH0cII+Q5b1fcITKSMrZ0CnMytkHHYPTvJ/uc2W9p3howAbMCs+WpNsSnLoCfq5ZjWclauV9Sn7OULQSMuKzTBF+bN7FOyolPbFrW+B3ESUpbonbLbKOubvsBjnUQLNoNjH4pa5Sg3Pluh1EoYLq/oKYU/C+SSwnbRy9N1h2z5UZy/CyrGNG8UomkuFIZWOAGH+zqwU1iCYaWHPgUNXM+4gSe0cGmVesFRpco5nhqvHGdDtw3OCC1U0f9jj6Pk+4jFmulj45+Hu4ZEL8wyMlftbycT8KtuqSVOD/yuytPFlvBzFrjP9s3V8ZN46y5rLpR9dAD+DJHYVESGxQV9lLq2g0p8IJ
#!/usr/bin/env sh
#
# Works best with blinking text: the last heart will blink when you have less
# than 25% of your battery life remaining.
#
# Add the following to your `~/.tmux.conf`;
#
# set -g status-right "#[fg=red]#(path/to/zelda-battery-tmux.sh) "
battery="$(pmset -g ps | awk 'NR==2' | perl -pe 's/.*?(\d+)%.*/\1/')"