This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream localhost { | |
server localhost:8000; | |
} | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
root /usr/share/nginx/html; | |
index index.html index.htm; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"default_line_ending": "unix", | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": true, | |
"font_size": 10, | |
"ignored_packages": [ | |
"Vintage" | |
], | |
"translate_tabs_to_spaces": true, | |
"trim_trailing_white_space_on_save": true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* | |
* Originally inspired by: http://designedbythomas.co.uk/blog/how-detect-width-web-browser-using-jquery | |
* | |
* Original source by https://gist.github.com/highrockmedia/3710930 | |
* | |
* My contribution: I re-wrote some code it to fire as one function, so you're only editing values in one place. | |
* | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var reflowDocument = function () { | |
var viewportWidth = jQuery(window).width(); | |
// do stuff here | |
}; | |
jQuery(document).ready(function($) { | |
var reflowTimer = null; | |
$(window).on('resize', function () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Made by Olof Fredriksson | |
# http://olof.nu | |
# https://github.com/oloffredriksson | |
# Tested on Raspberry Pi with Raspbian OS. Will probably work on Ubuntu and other Debian based systems, just make sure you install correct libspotify for your process architecture. | |
# Big thanks to Thomas Jost for creating Spop and uploading the project to Github (https://github.com/Schnouki/spop) | |
#Thanks to Björn Andersson (https://github.com/bjornandersson) for testing, reviewing and contributing to this guide. | |
# Changelog | |
# 1.0 2013-08-28 : First public release |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Add a function to String prototype to do multiple regex | |
* Credit goes to @datanizze | |
* Licence: Public domain | |
*/ | |
if(String.prototype.multiReplace === undefined) { | |
String.prototype.multiReplace = function(match, replace) { | |
var output = this; | |
for (var i in match) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Functions needed for this script | |
is_valid_ipv4() { | |
local -a octets=( ${1//\./ } ) | |
local RETURNVALUE=0 | |
# return an error if the IP doesn't have exactly 4 octets | |
[[ ${#octets[@]} -ne 4 ]] && return 1 |