Skip to content

Instantly share code, notes, and snippets.

Levin Van mamboer

Block or report user

Report or block mamboer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mamboer
mamboer / scrollIt.js
Last active Jan 22, 2018
Page scrolling in vanilla JavaScript
View scrollIt.js
// https://pawelgrzybek.com/page-scroll-in-vanilla-javascript/
function scrollIt(destination, duration = 200, easing = 'linear', callback) {
const easings = {
linear(t) {
return t;
},
easeInQuad(t) {
return t * t;
},
@mamboer
mamboer / dabblet.css
Created Jun 29, 2017 — forked from oli/dabblet.css
Using calc(), rem & vw for scalable rem-based layout
View dabblet.css
/* Using calc(), rem & vw for scalable rem-based layout */
/* ref http://dev.w3.org/csswg/css3-values/#calc0 example 13 */
/* waiting for vw support */
body {margin: 0; text-align: center;}
.wrapper {
width: 40rem;
margin: 2em auto;
border-bottom: 2px solid #ccc;
}
.content {
@mamboer
mamboer / html-languages.txt
Created Jun 20, 2017 — forked from JamieMason/html-languages.txt
HTML lang attribute / ISO language code reference / Culture names
View html-languages.txt
CULTURE SPEC.CULTURE ENGLISH NAME
--------------------------------------------------------------
Invariant Language (Invariant Country)
af af-ZA Afrikaans
af-ZA af-ZA Afrikaans (South Africa)
ar ar-SA Arabic
ar-AE ar-AE Arabic (U.A.E.)
ar-BH ar-BH Arabic (Bahrain)
ar-DZ ar-DZ Arabic (Algeria)
ar-EG ar-EG Arabic (Egypt)
@mamboer
mamboer / git_submodules.md
Created May 25, 2017 — forked from gitaarik/git_submodules.md
Git Submodules basic explanation
View git_submodules.md

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:

  • You can separate the code into different repositories.
@mamboer
mamboer / update_gfwlist.sh
Created Aug 3, 2016 — forked from VincentSit/update_gfwlist.sh
Automatically update the PAC for ShadowsocksX. Only tested on OS X.
View update_gfwlist.sh
#!/bin/bash
# update_gfwlist.sh
# Author : VincentSit
# Copyright (c) http://xuexuefeng.com
#
# Example usage
#
# ./whatever-you-name-this.sh
#
# Task Scheduling (Optional)
View gist:83fa802a76363a507ad29a88daf79143
yum -y groupinstall 'Development Tools'
yum -y install wget openssl-devel libxml2-devel libxslt-devel gd-devel perl-ExtUtils-Embed GeoIP-devel
OPENSSL="openssl-1.0.2h"
NGINX="nginx-1.11.1-1"
mkdir -p /opt/lib
wget https://www.openssl.org/source/$OPENSSL.tar.gz -O /opt/lib/$OPENSSL.tar.gz
tar -zxvf /opt/lib/$OPENSSL.tar.gz -C /opt/lib
@mamboer
mamboer / install-comodo-ssl-cert-for-nginx.rst
Created Jun 18, 2016 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.
View install-comodo-ssl-cert-for-nginx.rst

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@mamboer
mamboer / gist:e6a3cd0a514f3f795560f3777bfa536a
Created May 25, 2016 — forked from vladimirtsyupko/gist:10964772
Git force pull to overwrite local files
View gist:e6a3cd0a514f3f795560f3777bfa536a
git fetch --all
git reset --hard origin/master
git pull origin master
@mamboer
mamboer / gist:7549d4a28ee223e6d1f2
Created Oct 31, 2015 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan
View gist:7549d4a28ee223e6d1f2

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@mamboer
mamboer / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
You can’t perform that action at this time.