Skip to content

Instantly share code, notes, and snippets.

View manjeshpv's full-sized avatar
🇮🇳
in India

Manjesh V manjeshpv

🇮🇳
in India
  • LEADSchool.in
  • Bangalore
View GitHub Profile
@manjeshpv
manjeshpv / error.sh
Created December 12, 2016 13:02
zebrafishlabs/nginx-statsd.sh
/home/gloryque/custom-nginx/nginx-1.6.2/src/http/modules/nginx-statsd/ngx_http_statsd.c
/home/gloryque/custom-nginx/nginx-1.6.2/src/http/modules/nginx-statsd/ngx_http_statsd.c:36:5: error: unknown type name ‘ngx_resolver_connection_t’
ngx_resolver_connection_t *udp_connection;
^
/home/gloryque/custom-nginx/nginx-1.6.2/src/http/modules/nginx-statsd/ngx_http_statsd.c:63:27: error: unknown type name ‘ngx_resolver_connection_t’
ngx_int_t ngx_udp_connect(ngx_resolver_connection_t *rec);
^
/home/gloryque/custom-nginx/nginx-1.6.2/src/http/modules/nginx-statsd/ngx_http_statsd.c: In function ‘ngx_statsd_init_endpoint’:
/home/gloryque/custom-nginx/nginx-1.6.2/src/http/modules/nginx-statsd/ngx_http_statsd.c:303:5: error: unknown type name ‘ngx_resolver_connection_t’
ngx_resolver_connection_t *rec;
function qChecksum (o, algorithm, encoding) {
const obj = o; console.log(o)
if (typeof obj !== Object && !obj.body && _.empty(obj)) return obj;
obj.c = crypto.createHmac(algorithm || 'sha256', HMACSECRET)
.update(JSON.stringify(o.body), 'utf8')
.digest(encoding || 'hex');
return obj;
}
@manjeshpv
manjeshpv / radio-live-steam.bat
Created October 30, 2016 07:16
Live Stream Video with DynDNS and VLC Media Player
vlc.exe -vvv dshow:// :dshow-vdev="" :dshow-adev="M-Audio Delta AP Mon. Mixer" :live-caching=3000 :sout=#transcode{vcodec=none,acodec=mp3,ab=128,channels=2,samplerate=44100}:http{dst=:8080/radio.mp3} :sout-keep
@manjeshpv
manjeshpv / backup.sh
Created October 22, 2016 11:07 — forked from cedricvidal/backup.sh
ElasticSearch log index backup & restore scripts
#!/bin/bash
# herein we backup our indexes! this script should run at like 3 AM every first day of the month, 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 and backs up to whatever long term storage.
. ./config.sh
echo "Checking that index exist in ES"
if [ `curl -sI $ESURL/$INDEXNAME | grep OK | wc -l` -eq 0 ]
then
// http://dir.indiamart.com/mumbai/bulk-sms-service.html
$('.listing').each(function(i, list){
$(list).find('.listing-contact > span').find('script').remove()
console.log($(list).find('.product-name').text()+"\t"+$(list).find('.lcname > a').text()+"\t"+$(list).find('.cityLocation-grid').text()+"\t"+$(list).find('.listing-contact > span').text())
});
@manjeshpv
manjeshpv / kannel.conf
Created September 27, 2016 20:15
Kannel Config
group = core
admin-port = 13000
admin-password = Easy
status-password = Easy
admin-allow-ip = '*.*.*.*'
smsbox-port = 13001
log-level = 1
log-file = "/etc/kannel/logs/kannel.log"
box-allow-ip = "*.*.*.*"
# Resume counts
SELECT substr(resume_path, 1, 2) as a, count(1) FROM `candidates` group by a
@manjeshpv
manjeshpv / daily.sh
Created September 23, 2016 15:42
unix commands
# find number of files in folder recursively
find . -type f | wc -l
@manjeshpv
manjeshpv / minio.presignedPostPolicy.js
Last active May 25, 2016 11:59
Minio presignedPostPolicy
var Minio = require('minio')
var s3Client = new Minio({
endPoint: 'localhost',
accessKey: '991OQNY5DUSYGFORMKRX',
secretKey: 'Gi2CK8DKIAZPoyRtAXDx33xdJ6IzorEzU0j30F5j',
secure: false,
port: 9000
});
// Construct a new postPolicy.
@manjeshpv
manjeshpv / project.service
Created April 18, 2016 12:22
Systemd service for go and nodejs
# go
[Unit]
Description=Beatle
After=syslog.target
[Service]
WorkingDirectory=/root/go/bin
ExecStart=/root/go/bin/hello
ExecReload=/usr/bin/kill -HUP $MAINPID
Restart=always