Skip to content

Instantly share code, notes, and snippets.

@ioseb
ioseb / gist:69058
Created February 23, 2009 17:04
JavaScript array chunk function
function arrayChunk(array, size) {
var start = 0, result = [], chunk = [];
while((chunk = array.slice(start, start += size)).length) {
result.push(chunk);
}
return result;
}
@cmonyuk
cmonyuk / gist:868882
Created March 14, 2011 07:49
PHOTON Text Flyer
Saturday April 30, 2011
Wizard Crew Promotions proudly presents
*** PHOTON ***
An Immersive Visual Experience
Wizard Crew is back with our Spring event!
If you enjoyed TECHNOLUST, Back2Bassikz, and Snowmageddon last year, you won't want to miss this.
Musical Performances by
@logankoester
logankoester / rails.vim
Created October 4, 2011 20:34
Useful Rails.vim macros
" Factories and Configuration
Rnavcommand config config -suffix=.yml -default=application
Rnavcommand factory spec/factories test/factories -suffix=.rb -default=model()
" Backbone
Rnavcommand bmodel app/assets/javascripts/backbone/models -suffix=.coffee -default=model()
Rnavcommand bview app/assets/javascripts/backbone/views -suffix=.coffee
" Apotomo Widgets (Cells)
Rnavcommand widget app/widgets -suffix=_widget.rb
@croaky
croaky / HOW_TO.md
Created March 16, 2012 05:43 — forked from michaeldauria/gist:2048022
Migrate from Copycopter 1.0 (hosted by thoughtbot) to Copycopter 2.0 (open source, deploy your own instance)

Use the latest version of the copycopter_client gem:

gem 'copycopter_client', '2.0.0'

Export your published drafts from copycopter.com:

RAILS_ENV=production bundle exec rake copycopter:export

This will create a config/locales/copycopter.yml file.

Wizard Island 2012

We will be camping Friday and Saturday night at sites 87 & 88 on Lake George's Long Island, one of the southernmost islands 4.41 miles by kayak from the Village.

Date Friday September 21st - Sunday September 22nd

Cost $98/person

Limit 8 wizards

@svallory
svallory / extract_clone_all_script.js
Last active December 12, 2015 04:58
Generate shell script to clone all your repositories, or a configured subset of them from your GitHub Dashboard.
// Instructions:
// 1. Navigate to you GitHub dashboard, either (https://github.com or https://github.com/organizations/{org_name}
// 2. Click on "All repositories" or "Show N more repositories" to show all your repos
// 3. Open Firebug console, and paste this script. Optionally, change the options below
// 4. Run and have fun
var options = {
origin: "all", // can be: source, fork or all
visibility: "all", // can be: public, private or all
showInNewWindow: true
@shwaydogg
shwaydogg / letsEncryptModulus.md
Last active July 17, 2016 07:09
LetsEncrypt for Modulus Standalone Cetificate only Process

SETUP (nothing new here, it's from the docs)

On another server you control:

$ git clone https://github.com/letsencrypt/letsencrypt

$ cd letsencrypt

$ ./letsencrypt-auto

@st0012
st0012 / taipei_list.md
Last active July 27, 2019 15:45
Things to visit in Taipei

Places to go

  • Taipei 101
  • Tamsui
  • National Palace Museum
  • Shi-men Ting

Nigh markets

  • Tonghua Night Market - my favorite
    • There are some great bars nearby!
@amirrajan
amirrajan / main.rb
Last active September 30, 2020 19:02
DragonRuby collision and physics
def tick args
# initialization
args.state.x ||= 620
args.state.y ||= 700
args.state.dy ||= 0
args.state.dx ||= 25
args.state.gravity = -0.5
args.state.drag_coeff = 0.05
args.state.walls = [
[0, 0, 1280, 100],
@grncdr
grncdr / 00-Readme.md
Last active March 3, 2023 05:57
Delete unused assets

Delete unused assets

This is an example script for deleting assets that aren't linked in your content model. It does this by walking through all assets and checking for any links back to them.

WARNING: This script does not take into account assets that are only linked inside of Text fields. If you primarily embed images directly using the markdown editor, this will very likely delete assets you depend on.

You must fill in your own CMA access token & space ID at the top before running

Usage