- stop your vm & backup your disk
cp hdd.img hdd-backup.img
- resize the disk image
hdiutil resize -size [size]g hdd.img
- boot into linux and run
sudo parted /dev/[disk]
- if your swap partition is in the way (located immediately following your primary parition), delete & recreate it
rm [disk id of swap partition]
mkpartfs primary linux-swap
- start should be 1 gb away from end of disk
- end should be end of disk
- save and quit, reboot
- verify that the new swap is active
swapon -s
-- if not thenmkswap /dev/[disk][partition id]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while true; do | |
trap "exit 0" SIGINT | |
CEIL=10 | |
timeout=0 | |
ip link show eth0 | grep UP > /dev/null | |
ISUP=$? | |
let "timeout = $RANDOM % $CEIL + 1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var fs = require('fs'); | |
var path = require('path'); | |
var readdirp = require('readdirp') | |
module.exports = function(baseDir, outFile) { | |
var files = []; | |
var output = ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
09:19:14 ~/src/test | |
↳ cat package.json | |
{ | |
"name": "src", | |
"scripts": { | |
"test": "which tap" | |
}, | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.js", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var genius = /genius/i | |
// prevent genius.it/[your site] | |
if (genius.test(document.referrer) || genius.test(window.location.href)) { | |
document.location = 'https://stopitgenius.xyz' | |
} | |
// prevent the bookmarklet | |
var setAttribute = window.HTMLElement.prototype.setAttribute | |
window.HTMLElement.prototype.setAttribute = function (attr, val) { | |
if ((attr === 'src' || attr === 'href') && genius.test(val)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const EventEmitter = require('events') | |
function ComputedModel (props) { | |
const base = Object.create(new EventEmitter()) | |
const keys = Object.keys(props) | |
for (let i = 0, len = keys.length; i < len; i++) { | |
const key = keys[i] | |
const prop = props[key] | |
Object.defineProperty(base, `_${key}`, {writable: true, value: prop}) | |
if (typeof prop === 'function') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
var history = require('sheet-router/history'); | |
var sheetRouter = require('sheet-router'); | |
var document = require('global/document'); | |
var href = require('sheet-router/href'); | |
var hash = require('sheet-router/hash'); | |
var hashMatch = require('hash-match'); | |
var sendAction = require('send-action'); | |
var mutate = require('xtend/mutable'); | |
var assert = require('assert'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 1/2 cups cake flour | |
1/4 sugar | |
1/2 tsp salt | |
1/2 tsp baking soda | |
1/2 tsp baking powder | |
3/4 whole milk | |
3/4 whole milk yogurt | |
2 egg whites | |
4 tbls butter, melted | |
shot of vanilla extract |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const choo = require('choo') | |
// app 1 | |
const app1 = choo() | |
app1.model({ | |
state: { | |
data: 'app1', | |
}, | |
reducers: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const pull = require('pull-stream') | |
const Notify = require('pull-notify') | |
const notify = Notify() | |
pull(notify.listen(), pull.drain(console.log)) | |
notify('hello', 'world') | |
notify.end() |