Skip to content

Instantly share code, notes, and snippets.

View AimeeKnight's full-sized avatar
👩‍💻
MLOpsing

Aimee Knight AimeeKnight

👩‍💻
MLOpsing
View GitHub Profile
@trey
trey / happy_git_on_osx.md
Last active February 18, 2024 10:46
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "you@example.com"

@wycks
wycks / htaccess cache and stuff
Last active March 26, 2022 20:48
Boilerplate .htaccess from Paul Irish with WordPress added
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
@willurd
willurd / web-servers.md
Last active May 28, 2024 06:57
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@chyld
chyld / node.conf
Last active December 14, 2017 06:22
Install node.js, mongodb, redis on a 64-bit ubuntu 13.10 server using ec2 on amazon web services
description "Start node.js on reboot"
author "Chyld Medford <chyld.medford@gmail.com>"
# start node
start on runlevel [2345]
# stop on halt, maintenance or reboot
stop on runlevel [016]
# start our application with the user `ubuntu`
app.use(express.cookieParser());
app.use(express.session({
store : new RedisStore({host: 'localhost', port: 6379}),
secret: 'change-this-to-a-super-secret-message',
cookie: { maxAge: 60 * 60 * 1000 }
}));
9 var fs = require('fs');
10 var request = require('request');
11 var url = 'https://api:key-SOMEKEY@api.mailgun.net/v2/YOURDOMAIN/messages';
12 var post = request.post(url, function(err, response, body){
13 res.send({});
14 });
15 var form = post.form();
16 form.append('from', 'a.b@gmail.com');
17 form.append('to', 'chyld.medford@gmail.com');
18 form.append('subject', 'hey from node.js');
function initMap(lat, lng, zoom){
var mapOptions = {center: new google.maps.LatLng(lat, lng), zoom: zoom, mapTypeId: google.maps.MapTypeId.ROADMAP};
map = new google.maps.Map(document.getElementById('map'), mapOptions);
}
function addMarker(location){
var position = new google.maps.LatLng(location.lat, location.lng);
var marker = new google.maps.Marker({map:map, position:position, title:location.address});
markers.push(marker);
}
exports.db = function(fn){
MongoClient.connect(mongoUrl, function(err, db) {
if(err){throw err;}
global.nss = {};
global.nss.db = db;
global.nss.db.collection('listings').ensureIndex({'coordinates':'2dsphere'}, function(err, indexName){
console.log('Connected to MongoDB');
fn();
});
});
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active May 19, 2024 17:40
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@staltz
staltz / introrx.md
Last active May 28, 2024 17:42
The introduction to Reactive Programming you've been missing