Skip to content

Instantly share code, notes, and snippets.

View seangeleno's full-sized avatar

Sean Marcel Esteva seangeleno

View GitHub Profile
@seangeleno
seangeleno / README-Template.md
Last active August 1, 2017 18:47 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@seangeleno
seangeleno / skeleton-daemon.sh
Created April 30, 2017 06:38 — forked from shawnrice/skeleton-daemon.sh
A template to write a quick daemon as a bash script
#!/bin/sh
# This is a skeleton of a bash daemon. To use for yourself, just set the
# daemonName variable and then enter in the commands to run in the doCommands
# function. Modify the variables just below to fit your preference.
daemonName="DAEMON-NAME"
pidDir="."
pidFile="$pidDir/$daemonName.pid"
@seangeleno
seangeleno / CSS3 Media Queries Template
Created August 1, 2017 18:41
CSS3 Media Queries template
/*
* Author: http://stuffandnonsense.co.uk/blog/about/hardboiled_css3_media_queries/
*/
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}

The MIT License (MIT)

Copyright (c) 2015

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is

#!/bin/bash
cd /to/a/directory
# make comments
run -what --you=would type.on -the commandline
VARIABLES_ARE_A_THING="youcanuse"
# sometimes you want conditionals
@seangeleno
seangeleno / user.js
Created August 1, 2017 18:52 — forked from EtienneR/user.js
XMLHttpRequest RESTful (GET, POST, PUT, DELETE)
// Get all users
var url = "http://localhost:8080/api/v1/users";
var xhr = new XMLHttpRequest()
xhr.open('GET', url, true)
xhr.onload = function () {
var users = JSON.parse(xhr.responseText);
if (xhr.readyState == 4 && xhr.status == "200") {
console.table(users);
} else {
console.error(users);
@seangeleno
seangeleno / ShortIntroToScraping.rst
Last active November 22, 2017 10:01 — forked from bradmontgomery/ShortIntroToScraping.rst
Really short intro to scraping with Beautiful Soup and Requests
@seangeleno
seangeleno / alias.sh
Created August 1, 2017 18:58
aliases
# git aliases
git config --global alias.s status
git config --global alias.f fetch
git config --global alias.p pull
git config --global alias.c checkout
git config --global alias.m merge
git config --global alias.r rebase
git config --global alias.b branch
git config --global alias.o checkout
@seangeleno
seangeleno / blowfish.sh
Created August 1, 2017 19:00 — forked from tcoram/blowfish.sh
Blowfish crypto in sh and gawk
#!/bin/sh
#
# Blowfish - A pure posix shell and gawk implementation of the
# Blowfish algorithm.
# By Todd Coram (todd at maplefish dot com)
#
# This file is in the public domain. You are free to use it for any purpose.
#
# Be warned: This is a naive CBC implementation and is only meant for
# demonstrations and playing around with crytpo.
@seangeleno
seangeleno / gpg.sh
Last active March 17, 2018 20:05 — forked from TheFox/gpg.md
Creating the perfect GPG keypair
#!/usr/bin/env bash
# Original: https://alexcabal.com/creating-the-perfect-gpg-keypair/
KEY=xyz
DATE=$(date +"%Y%m%d")
SCRIPT_BASEDIR=$(dirname $0)
cd $SCRIPT_BASEDIR
echo "This script is not for use in automation"