Skip to content

Instantly share code, notes, and snippets.

View yoshuawuyts's full-sized avatar

Yosh yoshuawuyts

View GitHub Profile

arch

The goal is to get arch linux on a 2014 MBP Retina. We don't pretend to know what we're doing, so the goal is to aui in as few steps as possible so we don't have to configure the system ourselves.

create boot disk

# download iso first from https://www.archlinux.org/download/
$ hdiutil convert -format UDRW -o destination_file.img source_file.iso
@timoxley
timoxley / gist:ae19556a33dd3867a697
Last active August 29, 2015 14:20
tl;dr. 2.5 Dynamic Behavior Changes: Changing An Instance’s Class and Dynamic Inheritance

Organizing Programs Without Classes

Source: https://cs.au.dk/~hosc/local/LaSC-4-3-pp223-242.pdf

Section 2.5 Dynamic Behavior Changes: Changing An Instance’s Class and Dynamic Inheritance

tl;dr

Sometimes the behavior of an instance of a data type can be divided into several different “modes” of behavior or implementation…

@mohamed
mohamed / build-gn.sh
Last active September 23, 2022 06:25
Build Google gn build tool standalone
#!/usr/bin/env sh
set -euv
# Updated on April 2019 to reflect changes in GN
# See:
# https://github.com/ninja-build/ninja
# https://gn.googlesource.com/gn/
# We need a recent git
@mattdesl
mattdesl / readme.md
Last active August 29, 2015 14:20
scoped packages tip

Typical process:

  • fork a repo
  • make your patch
  • send PR

Sometimes its a long wait, and in the mean time you end up depending on Git (bad for semver/persistence, slow installs, etc).

public scoped packages

@rvagg
rvagg / install-node.sh
Last active April 2, 2024 16:51
install-node.sh - simple script to fetch and install Node.js releases and nightlies on Linux (x86, x64 & ARM) and OS X
#!/bin/bash
# Note your /usr/local will need to be writable by the user running it,
# alternatively run it with `sudo`
hasxz=$(which xzcat)
os=$(uname | tr '[A-Z]' '[a-z]')
arch=$(uname -m)
targetdir="/usr/local/"
domain=nodejs.org
@L1fescape
L1fescape / v8_console.cpp
Last active October 27, 2015 18:39
Add console.log to v8
// ... import v8 ...
static void LogCallback(const v8::FunctionCallbackInfo<v8::Value>& args) {
if (args.Length() < 1) return;
HandleScope scope(args.GetIsolate());
Handle<Value> arg = args[0];
String::Utf8Value value(arg);
printf("%s\n", *value);
}
// run maps to lazy multistream
var execspawn = require('npm-execspawn')
var duplexify = require('duplexify')
var multistream = require('multistream')
var parallel = require('parallel-multistream')
var pumpify = require('pumpify')
var duplexify = require('duplexify')
var toStream = function(cmd) {
@termie
termie / gist:216ccdfd87c54bd39aa6
Created January 20, 2015 09:52
auto-color based on directory
# add this to your .zshrc and then add
# $(__prompt_color) to your PROMPT
function __prompt_color()
{
local RGB CONVERTED RH GH BH RD GD BD
RGB=$(echo $(pwd) | md5 | cut -c 1-6)
RH=$(echo ${RGB} | cut -c 1-2)
GH=$(echo ${RGB} | cut -c 3-4)
@anaisbetts
anaisbetts / analytics.js
Created January 7, 2015 20:47
Google Analytics in Atom Shell
// Pretend that cookies work
(function (document) {
var cookies = {};
document.__defineGetter__('cookie', function () {
var output = [];
for (var cookieName in cookies) {
output.push(cookieName + "=" + cookies[cookieName]);
}
return output.join(";");
});
@thlorenz
thlorenz / steps-lldb-jit-on-osx.md
Last active April 21, 2021 09:56
lldb JIT on OSX (showing no useful info at this point)

Installation

Ninja

  • needed for faster Node.js builds
brew install ninja