Skip to content

Instantly share code, notes, and snippets.

View skyrocknroll's full-sized avatar

Yuvaraj L skyrocknroll

View GitHub Profile
@skyrocknroll
skyrocknroll / maven-installation.md
Created August 9, 2014 08:40
maven installation
@skyrocknroll
skyrocknroll / Phantomjs.md
Last active August 29, 2015 14:05
phantomjs html to pdf

Phantom js http api base on nodejs

https://github.com/Muscula/html2pdf.it

##Phantomjs

  • page.zoomFactor = 1.0; consider this value when designing. page.zoomFactor = 0.75 worked for me.
  • format A4
  • orientation portrait
#!/bin/bash
# herein we backup our indexes! this script should run at like 6pm or something, after logstash
# rotates to a new ES index and theres no new data coming in to the old one. we grab metadatas,
# compress the data files, create a restore script, and push it all up to S3.
TODAY=`date +"%Y.%m.%d"`
INDEXNAME="logstash-$TODAY" # this had better match the index name in ES
INDEXDIR="/usr/local/elasticsearch/data/logstash/nodes/0/indices/"
BACKUPCMD="/usr/local/backupTools/s3cmd --config=/usr/local/backupTools/s3cfg put"
BACKUPDIR="/mnt/es-backups/"
YEARMONTH=`date +"%Y-%m"`
@skyrocknroll
skyrocknroll / disk.md
Created September 18, 2014 10:40
disk usage analyser command

du -h / | grep '[0-9\.]\+M'

  • Instead of M if we PUT G then it will show only folder which is size of in GBs

Keybase proof

I hereby claim:

  • I am SkyRocknRoll on github.
  • I am yuvaraj (https://keybase.io/yuvaraj) on keybase.
  • I have a public key whose fingerprint is 5ED1 39D2 17C3 DAD8 F71C 069C C54A B221 D5AC 3AFE

To claim this, I am signing this object:

/**
* Campfire plugin for the uptime project - https://github.com/fzaninotto/uptime
*
* This index.js files goes to a directory `plugins/campfire` in your installation of uptime.
*
* Notifies all events (up, down, paused, restarted) to campfire
*
* This plugin has a dependency on `ranger`.
* Add this to the "dependencies" object in your `package.json` file :
*
@skyrocknroll
skyrocknroll / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@skyrocknroll
skyrocknroll / email.md
Last active August 29, 2015 14:08
SPF Best practices email server configuration
@skyrocknroll
skyrocknroll / python-packaging.md
Last active August 29, 2015 14:08
An adventure into python packaging bb_freeze , cx_freeze ,
{
"snippets": [
{
"match": {"global": true, "pkgname": ".", "fn": ".*_test.go"},
"snippets": [
{"text": "func Test", "title": "", "value": "func Test${1:ObjectName}${2:TestName}(t *testing.T) {\n\t$0\n}"},
{"text": "func Benchmark", "title": "", "value": "func Benchmark${1:ObjectName}${2:BenchmarkName}(b *testing.B) {\n\n\tb.StopTimer()\n\n\t$0\n\n\tb.StartTimer()\n\n\tfor i := 0; i < b.N; i++ {\n\t\t\n\t}\n\n}"},
{"text": "func Example", "title": "", "value": "func Example${1:ObjectName}${2:ExampleName}() {\n\n\t$0\n\n\t// Output:\n\t// \n\n}"}
]
}