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
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 https://github.com/v8/v8.git

2) Install depot tools

@netpoetica
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.
*/
* {
@netpoetica
netpoetica / Singleton.js
Created Aug 20, 2012
A Singleton in JavaScript that truly ensures one instance, can be lazy-loaded (you can instantiate it whenever you need it), and has private and public scope.
View Singleton.js
/* **
*
* Singleton.js - a true Singleton in JavaScript
*
* A Singleton in JavaScript that truly ensures one instance, can be lazy loaded / you
* can instantiate it whenever you need it and has private and public scope.
*
* @author Keith Rosenberg, netPoetica
*
* */
@netpoetica
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
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
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
@netpoetica
netpoetica / Setting up Nginx on Your Local System.md
Last active Jul 13, 2019
Setting up Nginx on Your Local System
View Setting up Nginx on Your Local System.md

#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 http://mxcl.github.io/homebrew/

The command to type into terminal to install homebrew is:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@netpoetica
netpoetica / ImportSVGToSymbol.html
Created Jan 8, 2013
In Paper.js, use importSVG to import an svg node to a useable symbol and remove it from the DOM.
View ImportSVGToSymbol.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Paperjs - ImportSVG to Symbol</title>
<script type="text/javascript" src="js/lib/paper.js"></script>
<script type="text/paperscript" canvas="canvas">
function SVGSymbol(elem){
var a = new Symbol(paper.project.importSvg(elem));
elem.parentNode.removeChild(elem);
@netpoetica
netpoetica / Switch Case is Not the JS Way
Last active Jan 13, 2018
Use functions + dictionary instead of Switch/Case (illustrative purposes)
View Switch Case is Not the JS Way
// Setup
function onGet(){ /* .. */ }
function onDelete(){ /* .. */ }
function onPost(){ /* .. */ }
var onPut = onPost; // Sharing functionality.
// Bad
function processRequest(method){
var requestMethod = method.toLowerCase();
View bubbleSort.js
function bubbleSort (arr) {
var left,
right,
swapped;
do {
swapped = false;
for (var i = 0; i < arr.length - 1; i++) {
left = arr[i];
right = arr[i + 1];
@netpoetica
netpoetica / .eslintrc.js
Last active Feb 22, 2017 — forked from dmnsgn/.eslintrc.js
.eslintrc Google JavaScript Style Guide (eslint v0.24.1)
View .eslintrc.js
{
// http://eslint.org/docs/rules/
"env": {
"browser": true, // browser global variables.
"node": false, // Node.js global variables and Node.js-specific rules.
"worker": false, // web workers global variables.
"amd": false, // defines require() and define() as global variables as per the amd spec.
"mocha": false, // adds all of the Mocha testing global variables.
"jasmine": false, // adds all of the Jasmine testing global variables for version 1.3 and 2.0.
You can’t perform that action at this time.