Skip to content

Instantly share code, notes, and snippets.

@unsalted
unsalted / sierra-hackintosh-z170-a.md
Last active May 15, 2020
Sierra 10.12.3 Hackintosh | Asus z170-A, Intel i5 6500, MSI GTX 960 OC, GTX1070(Dormant)
View sierra-hackintosh-z170-a.md

Sierra 10.12.3 Hackintosh

This is my build documentation for an ASUS Z170-A setup with an NVIDIA GTX960 and the Intel i5 6500, most of this came from Storks asus rog maximus build, his audio instructions didn't work for me so it differs substantially there. This build also doesn't have NVRAM. Nearest I can tell everything is running as expected, including all USB and audio ports.

Build

  • Asus Z170-A
  • Intel Core i5-6500
  • Crucial Ballistix Sport LT 32GB (2 x 16GB) DDR4-2400 Memory
  • MSI GeForce GTX 960 4GB Installed in slot 1!
@searls
searls / layout.html.erb
Created Aug 27, 2014
Delay implementing a PDF rendering feature by beating Chrome into submission instead
View layout.html.erb
<%= stylesheet_link_tag "application", :media => "screen,print" %>
@cobyism
cobyism / osx-install-media.md
Last active Sep 5, 2020
Command to create installable OS X USB drive.
View osx-install-media.md

Creating a bootable macOS USB installer

  • First, plug in an 8GB (or bigger) USB drive, and use Disk Utility to erase it
  • If you use the default settings, you should wind up with a blank drive at /Volumes/Untitled.

With that volume in place, and with the macOS installer sitting in /Applications/Install\ macOS\ [VERSION].app, run the following command in your terminal to create a bootable install media (for Sierra):

sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ macOS\ Sierra.app --nointeraction
@searls
searls / git-unpull
Created Aug 29, 2013
a handy way to unpull a pull that bit off more than you could chew.
View git-unpull
#!/bin/bash
git reset --hard HEAD@{1}
@jpillora
jpillora / di.coffee
Last active Apr 30, 2018
Micro JavaScript Dependancy Injection.Written in CoffeeScript / JS.This is *approximately* how AngularJS works.
View di.coffee
# Micro JavaScript Dependancy Injection
define = (name, val) ->
#init modules map if missing
define.mods = define.mods or {}
#store 'name'
define.mods[name] = val
inject = (fn) ->
#regex match on function.toString()
@davemo
davemo / jquery.touch.js
Last active Nov 2, 2016 — forked from twalling/jquery.touch.js
Zeptos touch events, ported to work inside jQuery, including jQuery Mobiles scroll suppression.
View jquery.touch.js
;(function($){
var touch = {},
touchTimeout, tapTimeout, swipeTimeout,
longTapDelay = 750, longTapTimeout
function parentIfText(node) {
return 'tagName' in node ? node : node.parentNode
}
function swipeDirection(x1, x2, y1, y2) {
@cowboy
cowboy / Gruntfile.js
Created Jan 9, 2013
grunt: lineman idea
View Gruntfile.js
module.exports = function(grunt) {
require('lineman').init(grunt);
grunt.initConfig({
// stuff
});
// Default task.
grunt.registerTask('default', ['run']);
};
@fxsjy
fxsjy / gist:3291755
Last active Jun 15, 2017
Memcached in JavaScript based on Node.JS
View gist:3291755
//author: Sun, Junyi (weibo.com/treapdb)
//usage: node --nouse-idle-notification --expose-gc --max-old-space-size=8192 memcached.js
var config ={
port: 11211,
max_memory: 300 // default 100M bytes
}
var net = require('net');
var LRU = function (max) { // this LRU implementaion is based on https://github.com/chriso/lru
@igrigorik
igrigorik / gist:3148848
Created Jul 20, 2012
Convert any YouTube video into an audio file you can listen to on the go...
View gist:3148848
# Convert any YouTube video into an audio file you can listen to on the go, using:
# http://rg3.github.com/youtube-dl/
{ ~ } > brew install ffmpeg
{ ~ } > wget https://raw.github.com/rg3/youtube-dl/2012.02.27/youtube-dl
{ ~ } > chmod u+x youtube-dl
# Pick which video format you want to download.. (use any YT video link)
{ ~ } > ./youtube-dl -s -F http://www.youtube.com/watch?v=vT1KmTQ-1Os
@tbranyen
tbranyen / backbone.collectioncache.js
Created Jun 4, 2012
Backbone.Collection caching by URL
View backbone.collectioncache.js
/*!
* backbone.collectioncache.js v0.0.2
* Copyright 2012, Tim Branyen (@tbranyen)
* backbone.collectioncache.js may be freely distributed under the MIT license.
*/
(function(window) {
"use strict";
// Dependencies
You can’t perform that action at this time.