Recent releases have been pre-built using cross-compilers and this script and are downloadable below.
If you have found these packages useful, give me a shout out on twitter: @adammw
#!/bin/zsh | |
#Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3 | |
#Disabling unwanted services on macOS 11 Big Sur (11) and macOS Monterey (12) | |
#Disabling SIP is required ("csrutil disable" from Terminal in Recovery) | |
#Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist | |
# user | |
TODISABLE=() |
{ | |
"immed": true, | |
"latedef": false, | |
"newcap": true, | |
"noarg": true, | |
"noempty": true, | |
"nonew": true, | |
"plusplus": false, | |
"quotmark": "single", | |
"regexp": false, |
var os = require('os'); | |
const RESOLUTION = 1000; // 1s CPU resolution | |
function cpusInfo() { | |
return os.cpus().map(function(cpu) { | |
var t = cpu.times; | |
return { | |
total: t.user + t.nice + t.sys + t.irq + t.idle, |
augroup sourcesession | |
autocmd! | |
autocmd VimEnter * nested | |
\ if !argc() && empty(v:this_session) && filereadable('Session.vim') | | |
\ source Session.vim | | |
\ endif | |
augroup END |
#!/bin/bash | |
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user | |
killall Finder |
function getSomeThings(callback) { | |
var completed = 0; | |
var people, tasks; | |
$.ajax('/data/people.json', { | |
dataType: 'json', | |
success: function(data) { | |
completed++; | |
people = data.people; | |
onFinished(); |
Recent releases have been pre-built using cross-compilers and this script and are downloadable below.
If you have found these packages useful, give me a shout out on twitter: @adammw
// Lack of tail call optimization in JS | |
var sum = function(x, y) { | |
return y > 0 ? sum(x + 1, y - 1) : | |
y < 0 ? sum(x - 1, y + 1) : | |
x | |
} | |
sum(20, 100000) // => RangeError: Maximum call stack size exceeded | |
// Using workaround |
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Created: 2010/12/05 | |
// Updated: 2018/09/12 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it) | |
// |
#!/bin/sh -e | |
# | |
# Usage: browser | |
# pipe html to a browser | |
# e.g. | |
# $ echo '<h1>hi mom!</h1>' | browser | |
# $ ron -5 man/rip.5.ron | browser | |
if [ -t 0 ]; then | |
if [ -n "$1" ]; then |