Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
See my social media for status.

Aria Stewart aredridel

💭
See my social media for status.
View GitHub Profile
View painful-upgrade
npm-website@4.1.0 /Users/aredridel/Projects/npm/npm-website
├─┬ @npmcorp/dr-frankenstyle@1.1.0
│ └─┬ vinyl-fs@1.0.0
│ ├─┬ glob-watcher@0.0.8
│ │ └─┬ gaze@0.5.2
│ │ └─┬ globule@0.1.0
│ │ └─┬ glob@3.1.21
│ │ └── graceful-fs@1.2.3
│ └── graceful-fs@3.0.8
├─┬ geoip-ultralight@0.1.3
View h.html
<script src=t1.js></script>
<script src=t2.js></script>
@aredridel
aredridel / boot-coreos.sh
Last active Jan 4, 2016
Set up and boot CoreOS on top of a stock DigitalOcean Fedora 19 install. Abuses the Fedora 19 root as the CoreOS STATE partition. Still todo: copy SSH keys from Fedora install.
View boot-coreos.sh
#!/bin/sh
kexec --load /boot/coreos_production_pxe.vmlinuz --initrd=/boot/coreos_production_pxe_image.cpio.gz --append='state=/dev/vda root=squashfs: sshkey="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAEAQCZ3fvhC7StXFdFRuXApBuXyS2phoH7ZVKMUMOi3DrbnZWC01GUq74WdalRDHtfq2dl0CPctLb8RHSD+/dKgWEH0gmoEOCio09ZAY5Ui4Cy+0cCGefXkUnJR4lgNOYD076BXjJwsCVCD8sMlFFT08Qn4/voP0jpL1uvvoWiC1KSvSjZf7sP/hRgsO633OuclXyVVq7mC6q+2QVg6hfO49Gt7TVXb+8lc8aUHAYyrXEVag6oICWqxWlSglbEpXCXhK4RB1f8h2vCaEPe2Kf1LNPYJ3dN5H5v+tnst9oZbFjo/qNSm4RvPBb3nsNARdcemdGcwiTjAiIn9gMxBMOyiYOYSgVwGd2U76FR0/RUFUORprynn6uebBhtpGzIAuFsUygMAPAM2tocO+t+h8AQviF6IeA9rKwf5bFTXV9HLy+iUoCWsVBmGypfGbsD7UNg3DIpXv4FdoLDDiCq+OV16ludjLk5pjknshH0cII+Q5b1fcITKSMrZ0CnMytkHHYPTvJ/uc2W9p3howAbMCs+WpNsSnLoCfq5ZjWclauV9Sn7OULQSMuKzTBF+bN7FOyolPbFrW+B3ESUpbonbLbKOubvsBjnUQLNoNjH4pa5Sg3Pluh1EoYLq/oKYU/C+SSwnbRy9N1h2z5UZy/CyrGNG8UomkuFIZWOAGH+zqwU1iCYaWHPgUNXM+4gSe0cGmVesFRpco5nhqvHGdDtw3OCC1U0f9jj6Pk+4jFmulj45+Hu4ZEL8wyMlftbycT8KtuqSVOD/yuytPFlvBzFrjP9s3V8ZN46y5rLpR9dAD+DJHYVESGxQV9lLq2g0p8IJ
View udpapp.js
var dgram = require('dgram');
var srp = require('srp');
var util = require('util');
var DBConn = require('./dbconn');
var proto = require('./proto');
// UDPApp
//
// This object encompasses all functionality dealing with the UDP endpoint of
View life.js
var fs = require('fs');
function writeTime(){
var lifedata;
var filename = './life.json';
fs.readFile(filename, 'utf8', function (err, data) {
if (err) throw err;
lifedata = JSON.parse(data);
doWrite();
});
@aredridel
aredridel / private.js
Created Jan 8, 2014
A method for having a 'private method' in javascript.
View private.js
module.exports = function Class() {}
Class.prototype.method = function () {
SomethingInternal.call(this)
}
function SomethingInternal() {
console.log("I'm internal, and I'm currently a method of", this);
}
View client.html
<script src="http://localhost:3000/socket.io/socket.io.js"></script>
<script>
var news = io.connect('http://localhost:3000/').of('/news');
news.emit("raul", new Array("1","2","3","4","5","6","7","8","9","10") );
news.on('get_random_number_from_raul', function(data) {
console.log('random', data);
});
@aredridel
aredridel / Filesystem.md
Last active Dec 31, 2015
Minimal filesystem-like API
View Filesystem.md

Minimal Filesystem-like API

No sync versions of functions. These may encapsulate high-latency remote filesystems. Including sync operations is inappropriate.

fs.rename

fs.stat

View gist:936634400599cd633d5d
0 info it worked if it ends with ok
1 verbose cli [ '/home/users/aredridel/Library/node/lib/node_modules/node-bin/bin/node',
1 verbose cli '/home/users/aredridel/Library/node/bin/npm',
1 verbose cli 'rm',
1 verbose cli 'node-bin' ]
2 info using npm@3.5.3
3 info using node@v5.1.0
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
View gist:6101455
Friend.findOne({
userId: req.signedCookies.userid
}, function (err, signedInUser) {
function doCheck(err, currentUser) {
if (err) {
res.send(err);
} else {
console.log('doCheck');
//for(var x = 0; x < users.length; x++) {
//var currentUser = users[x];