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/bash | |
cutycapt --url=$1 --out=$2 --min-height=1680 --min-width=1050 --js-can-open-windows=on --print-backgrounds=on --delay=2000 --user-agent="Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0" |
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
rename 's/OLD/NEW/' FILES | |
rename 's/picture/image/' picture*.jpg |
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
/** | |
* FileController | |
* | |
* @description :: Server-side logic for managing files | |
* @help :: See http://links.sailsjs.org/docs/controllers | |
*/ | |
var async = require('async'); | |
module.exports = { |
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 | |
### BEGIN INIT INFO | |
# Provides: fakes3 | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Example initscript | |
# Description: This file should be used to construct scripts to be | |
# placed in /etc/init.d. |
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
curl https://raw.githubusercontent.com/creationix/nvm/v0.16.1/install.sh | sh | |
source ~/.profile | |
nvm ls-remote | |
nvm install 0.11.14 | |
nvm alias default 0.11.14 |
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/bash | |
HOUR=3600 | |
REDISCLI=/home/zilli/redis/redis-cli | |
HOST=10.0.0.125 | |
$REDISCLI -h $HOST KEYS "$1" | | |
while read LINE; | |
do | |
echo "SET EXPIRE $LINE"; |
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 S = require('string'); | |
var moment = require('moment'); | |
var util = require('util'); | |
var im = require('node-imagemagick'); | |
var _ = require("underscore"); | |
var sizes = [{ | |
width: 200, | |
name: '-small' | |
}, { |
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 moment = require('moment'); | |
//esta semana | |
var week = moment().week(); | |
var startweek = moment().startOf('week').format("YYYY-MM-DD"); | |
var endweek = moment().endOf('week').format("YYYY-MM-DD"); | |
//semana passada | |
var week = moment().subtract(1, 'weeks').week(); | |
var laststartweek = moment().subtract(1, 'weeks').startOf('week').format("YYYY-MM-DD"); |
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/bash | |
nm-tool | grep DNS |
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/bash | |
genpasswd() { | |
local l=$1 | |
[ "$l" == "" ] && l=16 | |
tr -dc A-Za-z0-9_ < /dev/urandom | head -c ${l} | xargs | |
} | |
genpasswd |