Skip to content

Instantly share code, notes, and snippets.

@bretdavidson
bretdavidson / JSLint Options Descriptions
Last active October 5, 2018 22:37 — forked from dannygarcia/SublimeLinter.sublime-settings
Sublime Linter User Settings
anon true, if the space may be omitted in anonymous function declarations
bitwise true, if bitwise operators should be allowed
browser true, if the standard browser globals should be predefined
cap true, if upper case HTML should be allowed
continue true, if the continuation statement should be tolerated
css true, if CSS workarounds should be tolerated
debug true, if debugger statements should be allowed
devel true, if logging should be allowed (console, alert, etc.)
eqeq true, if == should be allowed
es5 true, if ES5 syntax should be allowed
@havvg
havvg / schema.xml
Created August 13, 2012 14:35
Propel 1.6: Sluggable with I18n
<?xml version="1.0" encoding="UTF-8"?>
<database name="default" defaultIdMethod="native" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xsd.propelorm.org/1.6/database.xsd">
<table name="country">
<column name="id" type="integer" autoIncrement="true" primaryKey="true" />
<column name="iso_code" type="char" size="2" required="true" />
<column name="name" type="varchar" size="255" required="true" primaryString="true" />
<behavior name="i18n">
<parameter name="i18n_columns" value="name, url" />
<parameter name="default_locale" value="de_DE" />
@siygle
siygle / index.html
Created October 1, 2012 10:19
nodejs sample using Persona
<!doctype html>
<html>
<head>
<style>
.persona {
border: 1px solid #666;
width: 100px;
text-align: center;
margin: 5px;
}
@nka11
nka11 / 0 resources for xda
Created October 3, 2012 11:35
Firefox os galaxy s3 porting notes
boot.img http://dl.free.fr/h4GMnkXNR
system.img http://dl.free.fr/fCtptJFxs
@naholyr
naholyr / _service.md
Created December 13, 2012 09:39
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
@guifromrio
guifromrio / nodejs-ubuntu-bind-port-80.md
Last active January 10, 2024 22:47
Allow Node.js to bind to privileged ports without root access on Ubuntu

How to: Allow Node to bind to port 80 without sudo

TL;DR

Only do this if you understand the consequences: all node programs will be able to bind on ports < 1024

sudo setcap 'cap_net_bind_service=+ep' /usr/local/bin/node

Important: your node location may vary. Use which node to find it, or use it directly in the command:

@timdream
timdream / README.md
Last active March 16, 2016 15:08
Build and update your own B2G build daily-ish without blow away data. Now comes with localization testing.

B2G Personal daily dogfooding instruction

This is how I generate my dogfood build, daily-ish. I do so to ensure I have (almost) total control over what goes into my phone so I could pick up the changes anytime I wanted (and indentifying the version of Gaia/Gecko I am using).

This instruction is used for Geeksphone Peak and with zh-TW locale. Replace/remove instruction for your own phone.

File locations:

  • update.sh should go to $B2G (the place you clone B2G repo with git).
@tkh44
tkh44 / FileController.js
Last active March 10, 2020 09:04
Simple file upload for sails.js
module.exports = {
get: function (req, res) {
res.sendfile(req.path.substr(1));
},
_config: {
rest: false,
shortcuts: false
}
};
@mdkcore0
mdkcore0 / mutefy
Last active August 29, 2015 14:02
mutefy
#!/bin/bash
####################################################################
# This script was created by: MDK - mdk@thecoreme.org #
# http://projects.thecoreme.org/ #
# May 28 2014 #
# Last update on Jun 09 2014 #
# #
# Simple script/wrapper to "mute" Spotify's ads #
# based on https://gist.github.com/pcworld/3198763#comment-1233334 #
# #
anonymous
anonymous / package.json
Created November 26, 2015 12:57
browserify+stylus+babel+hotreload
{
"scripts": {
"test": "mocha -g",
"start": "babel-node server.js",
"prestart": "npm run build",
"build": "npm-run-all 'build:*'",
"build:js": "cross-env NODE_ENV=production browserify -t babelify -t envify src/app.js > static/build.js",
"postbuild:js": "uglifyjs static/build.js -o static/build.js",
"build:css": "cross-env NODE_ENV=production stylus css/main.styl -o static",
"watch": "npm-run-all --parallel 'watch:*'",