Skip to content

Instantly share code, notes, and snippets.

View ruffrey's full-sized avatar
🥦

Jeff P ruffrey

🥦
View GitHub Profile
@nuxlli
nuxlli / sublime_text_2_useful_shortcuts.md
Created September 9, 2011 18:51 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods
@chadhutchins
chadhutchins / gist:1440602
Created December 6, 2011 23:36
Tarjan's strongly connected components algorithm in Javascript - followed pseudocode from http://en.wikipedia.org/wiki/Tarjan%E2%80%99s_strongly_connected_components_algorithm
window.onload = function() {
var v0 = new Vertex("0");
var v1 = new Vertex("1");
var v2 = new Vertex("2");
var v3 = new Vertex("3");
var v4 = new Vertex("4");
var v5 = new Vertex("5");
var v6 = new Vertex("6");
var v7 = new Vertex("7");
@hsablonniere
hsablonniere / README.md
Created May 2, 2012 22:42
scrollIntoViewIfNeeded 4 everyone!!!

scrollIntoViewIfNeeded 4 everyone!!!

This gist provides a simple JavaScript implementation of the non-standard WebKit method scrollIntoViewIfNeeded that can be called on DOM elements.

Usage

Just use the code in index.js in your app or website. You can see usage in the test page test.html.

The parent element will only scroll if the element being called is out of the view. The boolean can force the element to be centered in the scrolling area.

@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.
@adamloving
adamloving / temporary-email-address-domains
Last active May 31, 2024 15:43
A list of domains for disposable and temporary email addresses. Useful for filtering your email list to increase open rates (sending email to these domains likely will not be opened).
0-mail.com
0815.ru
0clickemail.com
0wnd.net
0wnd.org
10minutemail.com
20minutemail.com
2prong.com
30minutemail.com
3d-painting.com
@jedi4ever
jedi4ever / Compiling_Nodejs_Single_File.md
Last active October 10, 2020 15:12
Notes on compiling/packaging a node.js projects as a single binary

Compiling plain javascript (no external modules)

So we got nexe to compile nodejs projects to an executable binary:

  • it downloads the nodejs source
  • it creates a single file nodejs source (using sardines )
  • it monkey patches the nodejs code to include this single file in the binary (adding it to the lib/nexe.js)

$ nexe -i myproject.js -o myproject.bin -r 0.10.3

Caveats:

  • I had an issue with unicode chars that got converted: it uses uglify.js and this needs to be configured to leave them alone
@ruffrey
ruffrey / events-list.html
Last active December 19, 2015 00:19
Example events list which displays event time period. From bootstrap-calendar (tmpls): https://github.com/Serhioromano/bootstrap-calendar
<span class="hide" id="cal-slide-tick"></span>
<div id="cal-slide-content">
<ul class="unstyled">
<% _.each(events, function(event){ %>
<li>
<span class="pull-left event <%= $(event).data('event-class') %>"></span>&nbsp;
<a href="<%= $(event).attr('href') %>" target="_blank"
data-event-id="<%= $(event).data('event-id') %>"
data-event-class="<%= $(event).data('event-class') %>"
class="event-item">
@scottnix
scottnix / gist:10430003
Last active August 14, 2016 04:38
Gulpfile.js Sample, latest
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
rename = require('gulp-rename'),
notify = require('gulp-notify'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
markdown = require('gulp-markdown'),
@derekseymour
derekseymour / freshdesk_sso.js
Last active June 17, 2020 15:59
Freshdesk Single Sign On URL - Node.js
var crypto = require('crypto');
/**
* Generates and returns a Freshdesk Single Sign On URL
* {@link https://gist.github.com/derekseymour/26a6fe573c1274642976 Gist}
*
* @author Derek Seymour <derek@rocketideas.com>
* @param {String} name - The name of the user logging in.
* @param {String} email - A valid email address to associate with the user.
@ruffrey
ruffrey / .block
Last active March 3, 2022 12:53
HTML5 Canvas Pong with AI
license: mit