Skip to content

Instantly share code, notes, and snippets.

View SoxFace's full-sized avatar

Sonya SoxFace

View GitHub Profile
@SoxFace
SoxFace / deploy
Created January 20, 2016 02:02 — forked from victerryso/deploy
Meteor Deploy to Digital Ocean
# Sources
# johngibby.com/blog/How_to_deploy_your_meteor.js_app_on_Digital_Ocean
# stackoverflow.com/questions/20117104/mongodb-root-user
# digitalocean.com
# Create a Digital Ocean Ubuntu 14.04 Droplet
# You'll receive an email with your new IP and Password
# e.g.
# Droplet Name: dropletname
# IP Address: 000.000.000.000
@SoxFace
SoxFace / array.extend.js
Created January 27, 2016 04:41 — forked from zaparker/array.extend.js
Based on the LINQ extensions for C# IEnumerables, these functions extend the base JavaScript Array object with new methods for chaining together array operations. Also includes some examples and tests.
// performs the specified action on each item in the array
Array.prototype.forEach = function (fnAction) {
var l = this.length;
for (var i = 0; i < l; ++i) {
fnAction(this[i]);
}
}
// returns an array containing the items matching the filter
Array.prototype.where = function (fnFilter) {
var request = require('request');
var app = require('express')();
var results;
function logRes(){
console.log(results);
}
app.get('/storeData', minion1(req,res){
readResult(logRes)
@SoxFace
SoxFace / gist:c3e706f5ae3ca2a1e24ede97522b317f
Created October 11, 2016 01:41 — forked from trcarden/gist:3295935
Rails 3.2.7 SSL Localhost (no red warnings, no apache config)
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@SoxFace
SoxFace / USyd.kml
Created October 3, 2017 04:36 — forked from extramaster/USyd.kml
A Google Maps file (kml) of Building Points from The University of Sydney
<?xml version="1.0" ?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Name>USyd Buildings</Name>
<Placemark>
<name>1-3 Ross Street</name>
<description>Campus: Camperdown&lt;br&gt;Building Code: K06</description>
<Point>
<coordinates>151.184341,-33.884591</coordinates>
</Point>
@SoxFace
SoxFace / 2019OCT10.rb
Last active October 10, 2019 10:20
Riddle me Gabe
def example(a) # function a
b = [] # b is an empty array
for i in 0..a # for every (i)ndex in the range 0 to a (or 4 in this example)
b[i] = i # not clear how this works. I think it's a shorthand for .push
# More importantly, I don't know why you have to assign the position of the index in the array to i
end # end of loop
return b #return b
end # end of function
@SoxFace
SoxFace / ft_print_comb2.c
Last active November 17, 2022 05:49
42 Piscine
#include <unistd.h>
void ft_putchar(char c)
{
write(1, &c, 1);
}
void ft_print_comb2(void);
int main()