Skip to content

Instantly share code, notes, and snippets.

View julianduque's full-sized avatar
😈
Heroku DevRel

Julián Duque julianduque

😈
Heroku DevRel
View GitHub Profile
@endolith
endolith / Has weird right-to-left characters.txt
Last active April 7, 2024 01:38
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@indexzero
indexzero / readme-outline.md
Created November 14, 2011 08:26
A quick outline of a README.md

README.md Outline

  • Header and a Brief description (should match package.json)
  • Example (if applicable)
  • Motivation (if applicable)
  • API Documentation: This will likely vary considerably from library to library.
  • Installation
  • Tests
  • Contributors
  • License
@brentertz
brentertz / rvm2rbenv.txt
Created November 21, 2011 23:00
Switch from RVM to RBENV
## Prepare ###################################################################
# Remove RVM
rvm implode
# Ensure your homebrew is working properly and up to date
brew doctor
brew update
## Install ###################################################################
@troyk
troyk / contacts.js
Created February 23, 2012 12:38
Mongoose multiple schemas in single collection
// Don't care much about inheritance at this point, but I'll probably attempt it at
// some point via cloning ancestor schema's
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
var Contact = new Schema({
_type: String,
name: String
});
@jclulow
jclulow / 00_info.md
Created May 5, 2012 23:46
SmartOS rc.local

So, to get something like /etc/rc.local you can use the custom SMF import facility. (See the source for more information about how this actually works.)

/opt is mounted out of zones/opt by default. You can create a directory /opt/custom/smf and populate it with SMF manifests. Any manifests you put in there will be imported by SmartOS when it boots. Below is an example SMF manifest that simply starts /opt/custom/bin/postboot, a self-explanatory shell script that you can use like /etc/rc.local.

Note that it would likely be better to customise and respin your own images, as putting a bunch of platform state in the zones pool undoes some of the benefits of the ramdisk platform architecture that SmartOS has.

These instructions work for the Raspberry Pi running Raspbian (hard float) and create a hardware optimized version of NodeJS for the Raspberry PI, (and include a working install and NPM!!!):

  1. Install Raspbian - http://www.raspberrypi.org/downloads

  2. Install the necessary dependecies:

sudo apt-get install git-core build-essential

(If you just installed git then you need to administer your git identity first, else adding the patches below will fail!!!)

@TooTallNate
TooTallNate / n8.io.sh
Created October 31, 2012 20:07
The init.d startup script used for http://n8.io
#!/bin/bash
# n8.io daemon
# chkconfig: 345 20 80 (NR: what is this???)
# description: Nate's blog
# processname: n8.io
# original template from: http://werxltd.com/wp/2012/01/05/simple-init-d-script-template/
# working dir
DAEMON_PATH="/home/pi/n8.io"
@max-mapper
max-mapper / helloworld.js
Created November 27, 2012 06:55
droneduino
var serialport = require('node-serialport')
var sp = new serialport.SerialPort("/dev/ttyO3", {
parser: serialport.parsers.raw,
baud: 9600
})
sp.on('data', function(chunk) {
console.log(chunk.toString('hex'), chunk.toString(), chunk)
})
@sleeptillseven
sleeptillseven / erlang_vm.md
Last active July 18, 2016 13:44
Collection of interesting resources for studying the Erlang VM

List of Interesting Resources Describing the Erlang VM

Hitchhiker's guide to the Erlang VM

Author: Robert Virding (Co-inventor of Erlang)

Slides: pdf

Video: youtube

@indexzero
indexzero / styleguide.md
Last active June 27, 2016 21:29
A working draft of an "official" Nodejitsu Javascript style guide.

Javascript Styleguide

If you have comments on this or disagree about rules then please reach out to me directly. I want to hear it!

Table of Contents

Basics