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
### RHMOD Modded Oct2014. | |
# VCL compiler : this VCL is compatible with the new 4.0 format. | |
vcl 4.0; | |
sub mobile_detect { | |
#Based on Mobile-Detect 2.8.17 # https://github.com/serbanghita/Mobile-Detect |
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 extra classes for a variable width / height*/ | |
#div-video-wrapper { | |
position: relative; | |
background-color: #000; | |
border-radius: 5px; | |
box-shadow: 0 0 20px rgba(50, 50, 50, 0.95); | |
border: 2px #ccc solid; | |
margin-left: auto; | |
margin-right: auto; | |
margin-top: 20px; |
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 |
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
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
/* | |
# 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
/* | |
# 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: 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
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
/*global module:false, require:false */ | |
var pause = require("grunt-pause"); | |
module.exports = function(grunt) { | |
pause.init(grunt); | |
// Project configuration. | |
grunt.initConfig({ | |
// Extra Variables |