Skip to content

Instantly share code, notes, and snippets.

View michaelBenin's full-sized avatar
🏠
Remote

Michael Benin michaelBenin

🏠
Remote
View GitHub Profile
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
@codelahoma
codelahoma / get-your-vim-on.md
Last active August 5, 2020 17:22
Get Your Vim On

Get Your Vim On

Rod Knowlton (@codelahoma)

Tulsa Web Devs - 8/20/2012

Last Updated: - 10/11/2013

First Things First

@anasnakawa
anasnakawa / inline-image.scss
Created October 16, 2012 17:15
Base64 inline images function using compass/sass
.some-selector {
background: white #{inline_image("image.png")}
}
@spalger
spalger / gist:6417923
Created September 2, 2013 22:40
Inject jQuery and lodash into the current tab via a bookmarklet. To use, just create a new bookmark and use this as the URL.
javascript: (function () {
var el = document.createElement('pre'),
b = document.getElementsByTagName('body')[0],
otherjQuery = false,
msg = '',
libs = [
function loadjQuery() {
if (typeof jQuery != 'undefined') {
showMsg('This page already using jQuery v' + jQuery.fn.jquery);
} else {
anonymous
anonymous / blob-compressor.js
Created April 2, 2014 17:40
Blob compressor
/*!
* Utility for compressing/decompressing blobs in/out of redis
*/
function BlobCompressor(){
this.compressData = function(data, callback){
if(!data){
return callback(false, null);
}
@sogko
sogko / app.js
Last active November 8, 2022 12:31
gulp + expressjs + nodemon + browser-sync
'use strict';
// simple express server
var express = require('express');
var app = express();
var router = express.Router();
app.use(express.static('public'));
app.get('/', function(req, res) {
res.sendfile('./public/index.html');
@ChristopherA
ChristopherA / MacOSXYosementDevelopmentInstall.md
Last active June 5, 2019 15:30
Initial install for Mac OX 10.10 Yosemite as a development system, with Xcode, Brew, RVM, Cocoapods, etc.

Mac OSX 10.10 Yosemite Development Install

THIS IS A WORK IN PROGRESS USING THE YOSEMITE BETA - DO NOT RELY ON IT!

Fresh Install

Install OSX on a fresh drive. I recommend using Disk Utility to repartition the entire drive as 1 partition, as this clears any hidden volumes.

Once the initial install is complete, the OSX Setup Assistant will create your first adminstrator account.

@samselikoff
samselikoff / future-proof.md
Last active April 21, 2023 17:14
Future-proofing your Ember 1.x code

This post is also on my blog, since Gist doesn't support @ notifications.


Components are taking center stage in Ember 2.0. Here are some things you can do today to make the transition as smooth as possible:

  • Use Ember CLI
  • In general, replace views + controllers with components
  • Only use controllers at the top-level for receiving data from the route, and use Ember.Controller instead of Ember.ArrayController or Ember.ObjectController
  • Fetch data in your route, and set it as normal properties on your top-level controller. Export an Ember.Controller, otherwise a proxy will be generated. You can use Ember.RSVP.hash to simulate setting normal props on your controller.
@komuw
komuw / install NVM and nodeJS.yml
Created November 20, 2014 17:40
Ansible task to install nvm and nodeJS
#first seen here: http://www.snip2code.com/Snippet/63701/Ansible-task-to-install-nvm-and-node
# Here is how to install nvm and node in an Ansible task.
# I tried a bunch of different things, and as usual it's simple, but you have to get it right.
# The important part is that you have to shell with /bin/bash -c and source nvm.sh
---
- name: Install nvm
shell: >
curl https://raw.githubusercontent.com/creationix/nvm/v0.7.0/install.sh | sh
creates=/home/{{ ansible_user_id }}/.nvm/nvm.sh
@ericclemmons
ericclemmons / .eslintrc
Created March 24, 2015 03:52
My latest .eslintrc
{
"ecmaFeatures": {
"arrowFunctions": true,
"binaryLiterals": false,
"blockBindings": true,
"classes": true,
"defaultParams": true,
"destructuring": true,
"forOf": false,
"generators": true,