Skip to content

Instantly share code, notes, and snippets.

View sbeleidy's full-sized avatar

Saad Elbeleidy sbeleidy

View GitHub Profile
@sbeleidy
sbeleidy / lets-encrypt.sh
Created May 8, 2016 07:42
SSL all the things
# Let's Encrypt SSL Setup
# Following the awesome tutorial from digitalocean's community:
# https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-14-04
#####
sudo apt-get -y install git bc
sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt
sudo apt-get install nginx
sudo nano /etc/nginx/sites-available/default
# Add to server block:
# location ~ /.well-known {
@sbeleidy
sbeleidy / gundb-blog.js
Last active February 14, 2016 09:41
gun 0.3.4 intro
// View the walkthrough at https://medium.com/@sbeleidy/a-weekend-with-gun-a61fdcb8cc5d
localStorage.clear();
var gun = Gun();
var markInfo = {
name: "Mark",
username: "@amark"
};
@sbeleidy
sbeleidy / sanitize-example.js
Last active February 14, 2016 10:03
Convert arrays in an object to objects
// Complex object with arrays inside of it or its children
o = {
a: "a",
b: {
c: "c",
d: "d"
},
e: [1,2,3],
f: {
g: ["a","b","c", {
@sbeleidy
sbeleidy / newLara.sh
Last active December 27, 2015 12:56
Installing Laravel in remote empty repo
# For when installing laravel in an existing empty repo
# Clone and cd into repo then run the following
laravel new d
cd d
mv {.,}* ../
cd ..
rm -r d
@sbeleidy
sbeleidy / gulpfile.js
Created August 4, 2015 15:14
Foundation Gulpfile.js
var gulp = require('gulp'),
uglify = require('gulp-uglify'),
sourcemaps = require('gulp-sourcemaps'),
sass = require('gulp-sass'),
imagemin = require('gulp-imagemin'),
plumber = require('gulp-plumber'),
browserSync = require('browser-sync'),
reload = browserSync.reload();