Skip to content

Instantly share code, notes, and snippets.

Keith Rosenberg netpoetica

Block or report user

Report or block netpoetica

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
netpoetica / Compiling v8 and Hello, World Example on Mac OSX Mavericks (10.9.4).md
Last active Dec 5, 2019
Compiling v8 and Hello, World Example on Mac OSX Mavericks (10.9.4), Link Clang to Static Libraries, properly configure your environment for v8 build
View Compiling v8 and Hello, World Example on Mac OSX Mavericks (10.9.4).md

Compiling v8 and Hello, World Example on Mac OSX Mavericks (10.9.4)

by Keith Rosenberg (netpoetica)

Note: do this in some sort of project/ directory that makes sense. depot_tools are going to need to be in your path, so you may want to install them somewhere you are comfortable with.

1) Get the v8 source

git clone

2) Install depot tools

netpoetica / enumerate.js
Last active Aug 29, 2015
enumerate - decompose an array for iteration in a
View enumerate.js
// You have an array
var myArr = ["a", 'b', "c"];
// You want to enumerate through it w/ specified index. If you enumerate
// through an array by default index cannot be "guaranteed" as per MSDN:
// should not be used to iterate over an Array where index order is important. Array indexes are just enumerable properties with integer names and are otherwise identical to general Object properties. There is no guarantee that will return the indexes in any particular order and it will return all enumerable properties, including those with non–integer names and those that are inherited.
netpoetica / indexOfAll.js
Created Jun 8, 2014
Return the index of all instances of an item in an String
View indexOfAll.js
String.prototype.indexOfAll = function(s){
// Make sure it's 1 char, use first char of string.
s = s[0];
var results = [],
result = null,
i = 0,
offset = 0, // Incremented by previous index
netpoetica / ios-select-fix.css
Last active Nov 26, 2019
iOS Disable User Select but Allow Input (Snippet)
View ios-select-fix.css
This is for demonstration purposes. Ideally, you should never use the star selector.
I recommend that you use this early on in your development, and then once you've established
your HTML element palette, go back and replace * with a comma-separated list of your
tag names. Additionally, the !important shouldn't have to be used, but I'm leaving it here
because some enterprising goons will probably copy and paste this directly into their project -
the !important will ensure these settings override other attempts that were either never
deleted or are part of an installed CSS file the user is unaware of.
* {
View mini-console.html
<div id="consolelog" style="font-family: 'Courier New', Courier, monospace; font-size: 12px; margin: 40px 30px 0px; background-color: white; border: 2px solid black; padding: 10px;"></div>
<input type="text" id="consoleinput" style="margin: 0px 30px; width: 400px;" onkeypress="return evalConsoleInput(event, this.value);" />
<script type="text/javascript">
var appendConsole = function(message, type) {
var color = "black";
if (type === "error") {
color = "red";
} else if (type === "debug") {
netpoetica / .alias
Last active Oct 2, 2019
Terminal aliases
View .alias
alias g="git"
alias cleanup="find . -type f -name '*.DS_Store' -ls -delete"
alias tree="ls -alR"
alias psef= "ps -ef | grep $1"
alias printports="lsof | grep TCP "
alias devtoolscss="cd ~/Library/Application\ Support/Google/Chrome/Default/User\ StyleSheets/"
alias python3='nocorrect python3'
alias pip3='pip-3.3'
alias cltdr="ls -R | grep \":$\" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'"
alias qserve='python -m SimpleHTTPServer'
netpoetica / .gitconfig
Last active Oct 2, 2019
.gitconfig - Be sure to change the information in the [user] section to your username! A lot of this came from all over the WWW, including from the maestro @iansheridan
View .gitconfig
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
netpoetica / Clevar.js
Last active Dec 21, 2015
Clevar constructs an accessor function that retains its own History Store and keeps the value absolutely private. Neat utility for tracking history of a variable over time.
View Clevar.js
var Clevar = function(value){
// Constructs an accessor function that retains its own History Store.
var _this = this;
var _history = []; // Indexable history (newest to oldest)
// Define static objects, only the first time Clevar is run.
Clevar.Record = Clevar.Record || function(value){
this.created = new Date();
this.value = value;
netpoetica / Setting up Nginx on Your Local
Last active Jul 13, 2019
Setting up Nginx on Your Local System
View Setting up Nginx on Your Local

#Setting up Nginx on Your Local System ###by Keith Rosenberg

##Step 1 - Homebrew The first thing to do, if you're on a Mac, is to install homebrew from

The command to type into terminal to install homebrew is:

ruby -e "$(curl -fsSL"
View .vimrc
" make Vim more useful
set nocompatible
" vundle
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
You can’t perform that action at this time.