start new:
tmux
start new with session name:
tmux new -s myname
-- Playing with the nixio.fs library. | |
local nixiofs = require('nixio.fs') | |
-- Test if a file exists. | |
-- @param fname string | |
-- filename | |
-- @return boolean | |
-- true if file exists, false otherwise | |
-- |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
#!/usr/bin/env bash | |
# | |
# needs: Pulseaudio, VLC | |
# Load null sink module if not already loaded | |
pacmd list-sinks | grep steam 2>&1 >/dev/null | |
if [[ $? == 1 ]]; then | |
pactl load-module module-null-sink sink_name=steam; | |
fi |
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited | |
# | |
# Current known FCC address ranges: | |
# https://news.ycombinator.com/item?id=7716915 | |
# | |
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft | |
# | |
# In your nginx.conf: | |
location / { |
; Command & Conquer RULES.INI | |
; If placed in game directory, it will not override built in values. Values to be used as | |
; multipliers or percentages can be specified as either a simple floating point number (embed ".") | |
; or as a conventional percentage number (append "%"). Values used as cell distances or time delays | |
; are specified as simple floating point number. Distance values are expressed in cells. Time | |
; values are expressed in minutes. | |
; This is not the real file because there is none - the C&C rules were hard-coded into the game.dat | |
; file (C&C95.exe in Win95 Edition). This is what the file could have been like, based on what | |
; editors/testing tells us, as well as what the values were in Red Alert, which is VERY similar to |
/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ | |
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b, |
update: this post has been moved to my blog
Welcome! Today I'd like to talk about another subject which can't be emphasized enough: Code Quality. This entails a lot of tools and patterns that ultimately come together to make your game more solid and programmer friendly. Even if you're working alone on a project, these tools can save you some precious debugging time by pointing out simple errors, if not more complex ones. I'll be using my current project, c as an example where possible.
A few notes before we get started:
Some of the easiest tools you can set up for your project are JSHint and JSCS. These tools provide basic st