Skip to content

Instantly share code, notes, and snippets.

I´m a Saint

Alfredo Llanos biojazzard

I´m a Saint
View GitHub Profile
heiswayi /
Created Feb 5, 2017
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
w00fz /
Last active Feb 7, 2022
PHP switcher
# Check if command was ran as root.
if [[ $(id -u) -eq 0 ]]; then
echo "The command \"sphp\" should not be executed as root or via sudo directly."
echo "When a service requires root access, you will be prompted for a password as needed."
exit 1
# Usage
biojazzard / email-microdata-sample
Created Jan 13, 2016
Email unsubscribe microdata sample
View email-microdata-sample
<span itemscope itemtype="">
<span itemprop="description" content="We need to confirm your email address."></span>
<span itemscope itemprop="action" itemtype="">
<meta itemprop="name" content="Confirm Subscription">
<span itemprop="handler" itemscope itemtype="">
<meta itemprop="url" content="https:/">
<link itemprop="method" href="">
#!/usr/bin/env bash

# Assuming OS X Yosemite 10.10.4

# Install XCode and command line tools
# See
# See
xcode-select --install
chrismdp /
Last active Sep 6, 2022
Uploading to S3 in 18 lines of Shell (used to upload builds for
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (
# Based on a modified script from here:
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
View Makefile
all: es.json
es.json: subunits.json places.json provinces.json
topojson \
-o es.json \
--id-property SU_A3 \
--properties name=NAME \
-- \
subunits.json \
provinces.json \
natelandau / .bash_profile
Last active Sep 22, 2022
Mac OSX Bash Profile
View .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
chriskjaer / gulpfile.js
Last active Nov 1, 2017
Gulp recipe: Jade, Sass, Livereload and static server
View gulpfile.js
var gulp = require('gulp'),
gutil = require('gulp-util'),
sass = require('gulp-sass'),
csso = require('gulp-csso'),
uglify = require('gulp-uglify'),
jade = require('gulp-jade'),
concat = require('gulp-concat'),
livereload = require('gulp-livereload'), // Livereload plugin needed:
tinylr = require('tiny-lr'),
express = require('express'),
SaneMethod / jquery-ajax-blob-arraybuffer.js
Last active Mar 14, 2022
Ajax transports to allow the sending/receiving of blobs and array buffers via the familiar jquery ajax function.To send, set data to the blob or arraybuffer to be sent, and add 'processData:false' to the ajax options.To receive, specify the 'dataType' as blob or arraybuffer in the ajax options.
View jquery-ajax-blob-arraybuffer.js
* Register ajax transports for blob send/recieve and array buffer send/receive via XMLHttpRequest Level 2
* within the comfortable framework of the jquery ajax request, with full support for promises.
* Notice the +* in the dataType string? The + indicates we want this transport to be prepended to the list
* of potential transports (so it gets first dibs if the request passes the conditions within to provide the
* ajax transport, preventing the standard transport from hogging the request), and the * indicates that
* potentially any request with any dataType might want to use the transports provided herein.
joyrexus /
Last active Sep 19, 2022 — forked from liamcurry/gist:2597326
Vanilla JS equivalents of jQuery methods

Sans jQuery


// jQuery
$(document).ready(function() {
  // code