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
if (!_cli.args.length) { | |
// show help by default | |
_cli.parse([ process.argv[0], process.argv[1], '-h' ]); | |
process.exit(0); | |
} |
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
/*global module:false, require:false */ | |
var pause = require("grunt-pause"); | |
module.exports = function(grunt) { | |
pause.init(grunt); | |
// Project configuration. | |
grunt.initConfig({ | |
// Extra Variables |
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
/*global module:false, require:false */ | |
var pause = require("grunt-pause"); | |
module.exports = function(grunt) { | |
pause.init(grunt); | |
// Project configuration. | |
grunt.initConfig({ | |
// Extra Variables |
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
func (self *Security) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) { | |
// Browser CORS | |
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS | |
// http://www.html5rocks.com/en/tutorials/cors/ | |
origin := r.Header.Get(mjdlib.HttpHeaderKeyOrigin); | |
// Browser CORS Origin: a Preflight Request (OPTIONS) | |
if r.Method == "OPTIONS" { | |
mjdlib.LogInfo("**CORS OPTIONS URL %v: \n request = %v\n", r.RequestURI, r) |
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
/* | |
# Filename: databaselocked.go | |
# Script | |
go get | |
go run databaselocked.go --addtestdata | |
go run databaselocked.go --updates | |
go run databaselocked.go --updates > updates.log 2>&1 | |
grep "ERROR" updates.log | |
*/ |
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
/* | |
# Filename: databaselocked2.go | |
# Script | |
go get | |
go run databaselocked2.go --addtestdata | |
go run databaselocked2.go --updates | |
go run databaselocked2.go --updates > updates.log 2>&1 | |
grep --context=2 --ignore-case "sqlite3.Error" updates.log | |
*/ |
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
/* | |
# Filename: databaselocked3.go | |
# Mysql | |
DROP DATABASE dbtest; | |
CREATE DATABASE dbtest; | |
DROP USER utest@localhost; | |
CREATE USER utest@localhost IDENTIFIED BY 'ptest2322'; | |
GRANT ALL PRIVILEGES ON dbtest.* TO utest@localhost WITH GRANT OPTION; |
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
nano /etc/cgi-collectd-varnishstat.sh | |
#!/bin/bash | |
echo "Content-Type:application/json" | |
echo "Cache-Control: no-cache, no-store, must-revalidate" | |
echo "Pragma: no-cache" | |
echo "Expires: 0" | |
echo "" | |
varnishstat -j -f MAIN.cache* | |
exit 0 |
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
package com.pany.android.myapp; | |
import android.app.Application; | |
import android.util.Log; | |
import com.google.android.gms.analytics.GoogleAnalytics; | |
import com.google.android.gms.analytics.Logger; | |
import com.google.android.gms.analytics.Tracker; | |
import java.util.HashMap; | |
/** |
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
GITSHELL> | |
cd home | |
git clone https://github.com/GumbyFramework/Claymate.git | |
cd Claymate | |
edit package.json : CHANGE "bower": "~1.0.0", to "bower": "~1.3.0", | |
npm install -g | |
GITSHELL> | |
cd home | |
claymate build |
OlderNewer