Skip to content

Instantly share code, notes, and snippets.

View thibmaek's full-sized avatar
🐹
Currently coding a lot in Go

Thibault Maekelbergh thibmaek

🐹
Currently coding a lot in Go
View GitHub Profile
@gre
gre / easing.js
Last active April 30, 2024 04:58
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
@btoone
btoone / curl.md
Last active April 2, 2024 20:18
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@leommoore
leommoore / nginx_basics.md
Last active March 2, 2024 01:13
Nginx Basics

#Nginx Basics for Ubuntu

Please see http://wiki.nginx.org/Main for more information. See http://arstechnica.com/gadgets/2012/11/how-to-set-up-a-safe-and-secure-web-server/ for a tutorial on how to install Nginx.

##Installation To install, you can install the version which is in the standard Ubuntu repositories but it is normally quite old and will not have the latest security patches. The best way is to update the repositories first:

apt-get update
apt-get install python-software-properties

apt-get upgrade

@dergachev
dergachev / README.md
Created October 10, 2012 16:49
Vagrant tutorial

Vagrant Setup

This tutorial guides you through creating your first Vagrant project.

We start with a generic Ubuntu VM, and use the Chef provisioning tool to:

  • install packages for vim, git
  • create user accounts, as specified in included JSON config files
  • install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository

Afterwards, we'll see how easy it is to package our newly provisioned VM

@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@ngryman
ngryman / em.scss
Created March 3, 2013 19:03
sass px to em mixin
// http://viljamis.com/blog/2013/prototyping-responsive-typography/?utm_source=Responsive+Design+Weekly&utm_campaign=76e7785581-Responsive_Design_Weekly_046&utm_medium=email
$browser-context: 16; // Default
@function em($pixels, $context: $browser-context) {
@return #{$pixels/$context}em
}
@stonehippo
stonehippo / RPi-Dashing-howto.md
Last active October 6, 2021 13:52
Setting up a Raspberry Pi as a dashboard server with Dashing

Setting up a Raspberry Pi as a dashboard server with Dashing

Why the heck did I do this?

I wanted to set up one of my Raspberry Pi's as a data dashboard, pushing sensor data to a web interface that's easy to digest. I decided to use Shopify's Dashing framework. Dashing is based on Sinatra, and is pretty lightweight.

Dashing does require Ruby 1.9.3 to run. In addition, it makes use of the execjs gem, which needs to have a working Javascript interpreter available. Originally, I tried to get therubyracer working, but decided to switch over to Node.js when I ran into roadblocks compiling V8.

One warning: The RPi is a very slow system compared with modern multi-core x86-style systems. It's pretty robust, but compiling all this complex software taxes the system quite a bit. Expect that it's going to take at least half a day to get everything going.

@maoueh
maoueh / gist:8260199
Last active March 31, 2022 12:30
OpenELEC (4.0.1) WIFI connection details using `connman`

Even though there is a nice XBMC add-on to configure your WIFI settings, sometimes, you may still want to setup the WIFI connection for many reasons or just for fur.

OpenELEC use connman for managing connection to the various available network.

Setuping connman to connect to your protected WIFI network is an easy requiring you only to create a config file and enter some commands in a shell.

@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active February 12, 2024 17:18
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote