This file contains 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
<!DOCTYPE html> | |
<html ng-app="mgcrea.ngStrapDocs"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>AngularJS Plunker</title> | |
<script> | |
document.write('<base href="' + document.location + '" />'); | |
</script> | |
<link rel="stylesheet" href="style.css" /> |
This file contains 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
mkdir /var/local/tmp | |
cd /var/local/tmp | |
wget https://gist.githubusercontent.com/mani95lisa/6520782/raw/493ff109988bde965dc2d37a653886ebd57bc529/install_nodejsV0.10.9.sh | |
sudo sh install_nodejsV0.10.9.sh | |
wget https://gist.githubusercontent.com/mani95lisa/6607004/raw/e0338f9861936c2a346ed68b7e6509884a77a923/redis.conf | |
mkdir /etc/redis | |
mv redis.conf /etc/redis | |
wget -O /etc/init.d/redis https://gist.githubusercontent.com/mani95lisa/7766989/raw/4d328f653a4196ceb1179b429f5180f23f82ff57/redis | |
chmod +x /etc/init.d/redis | |
cp /etc/rc.local /etc/rc.local.tmp |
This file contains 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 Hapi = require('hapi'); | |
var internals = {}; | |
internals.main = function () { | |
var server = new Hapi.Server(80, { files: { relativeTo: __dirname } }); | |
server.route([ | |
{ method: 'GET', path: '/{path*}', handler: { directory: { path: '/', listing:true } } }, | |
{method: 'GET', path:'/', handler: {file:'/index.html'}} |
This file contains 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
//ActionScript3 upload file to qiniu.com | |
var u:URLRequest=new URLRequest('http://up.qiniu.com'); | |
u.method=URLRequestMethod.POST; | |
u.requestHeaders=[new URLRequestHeader('enctype', 'multipart/form-data')]; | |
var ur:URLVariables=new URLVariables(); | |
ur.key='Your file name in qiniu.com'; | |
ur.token='Your uptoken from server'; //Only this is required | |
ur['x:param'] = 'Your custom param and value'; | |
u.data=ur; |
This file contains 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
wget http://devtools.qiniudn.com/qiniu-devtools-linux_amd64-current.zip | |
unzip qiniu*.zip | |
mv qrsync /usr/bin/qrsync | |
mv qboxrsctl /usr/bin/qboxrsctl | |
mv qetag /usr/bin/qetag | |
mv qrsboxcli /usr/bin/qrsboxcli | |
rm -f qiniu*.zip |
This file contains 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/sh | |
# | |
# Simple Redis init.d script conceived to work on Linux systems | |
# as it does use of the /proc filesystem. | |
# | |
# chkconfig: - 85 15 | |
# description: Redis is a persistent key-value database | |
# processname: redis | |
REDISPORT=6379 |
This file contains 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
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Updated: 2010/12/05 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it) | |
// | |
// Permission is hereby granted, free of charge, to any person |
This file contains 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
git config --global alias.co checkout | |
git config --global alias.br branch | |
git config --global alias.ci commit | |
git config --global alias.st status | |
git config --global alias.unstage 'reset HEAD --' | |
git config --global alias.last 'log -1 HEAD' |
This file contains 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
wget http://cloud.github.com/downloads/rvoicilas/inotify-tools/inotify-tools-3.14.tar.gz | |
tar -zxvf inotify-tools-3.14.tar.gz | |
cd inotify-tools-3.14 | |
./configure | |
make | |
make install | |
updatedb |
This file contains 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
# Redis configuration file example | |
# Note on units: when memory size is needed, it is possible to specify | |
# it in the usual form of 1k 5GB 4M and so forth: | |
# | |
# 1k => 1000 bytes | |
# 1kb => 1024 bytes | |
# 1m => 1000000 bytes | |
# 1mb => 1024*1024 bytes | |
# 1g => 1000000000 bytes |