Skip to content

Instantly share code, notes, and snippets.

@ryanpitts
ryanpitts / loremipsum.js
Created September 20, 2011 20:08
Lorem Ipsum from Beowulf in Old English
/*
* Modified Lorem Ipsum Generator by Fredrik Bridell (http://bridell.com/loremipsum/)"
*
* To use: download the .js file, and in your html include the markup:
* <script type="text/javascript" src="loremipsum.js"></script>
*
* Where you want the Lorem Ipsum, include something like:
* <script type="text/javascript">loremIpsumParagraph(100)</script>
*/
@timkelty
timkelty / gist:1641444
Created January 19, 2012 17:54
Scrape page and save assets with wget
wget -E -H -k -K -p -nd -P myfoldertarget/ http://mypage.com/
@liamcurry
liamcurry / gist:2597326
Created May 4, 2012 19:56
Vanilla JS vs jQuery

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active June 5, 2024 22:16 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@booleanbetrayal
booleanbetrayal / Gruntfile.js
Last active November 9, 2023 18:59
Example GruntJS configuration for a replacement to the Sprockets Rails asset pipeline
'use strict';
module.exports = function(grunt) {
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
// configurable paths
var paths = {
@shaharke
shaharke / ec2_protect.yml
Created March 15, 2014 17:12
Protecting your production EC2 instanced from termination with Ansible
---
- hosts: all
tasks:
- name: Gather EC2 facts
action: ec2_facts
- name: Turning on termination protection
local_action: command aws ec2 modify-instance-attribute --region {{ ansible_ec2_placement_region }} --instance-id {{ ansible_ec2_instance_id }} --attribute disableApiTermination --value true
{% set field = content.getField('file') %}
{% set uri = 'content/download/' ~ content.contentInfo.id ~ '/' ~ field.id ~ "/file/" ~ field.value.fileName|escape( 'url' ) %}
{% set uri = path( 'ez_legacy', {'module_uri': uri} ) %}
@vmsp
vmsp / sed_oneliners
Created June 27, 2015 22:44
Useful One-Line Scripts For Sed
-------------------------------------------------------------------------
USEFUL ONE-LINE SCRIPTS FOR SED (Unix stream editor) Dec. 29, 2005
Compiled by Eric Pement - pemente[at]northpark[dot]edu version 5.5
Latest version of this file (in English) is usually at:
http://sed.sourceforge.net/sed1line.txt
http://www.pement.org/sed/sed1line.txt
This file will also available in other languages:
Chinese - http://sed.sourceforge.net/sed1line_zh-CN.html