Skip to content

Instantly share code, notes, and snippets.

View vrkansagara's full-sized avatar
😀
Coding :-)

Vallabh Kansagara vrkansagara

😀
Coding :-)
View GitHub Profile
@vrkansagara
vrkansagara / gist:df5df011bc36a51ce0fa6c7b0de84386
Created November 27, 2017 14:43 — forked from benleov/gist:292fb7ee692e830f5dd1
Sample SOAP Client running over SSL(TLS)
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.net.URL;
import java.net.URLConnection;
import java.security.InvalidKeyException;
import java.security.KeyManagementException;
@vrkansagara
vrkansagara / example.php
Created October 25, 2017 14:06 — forked from ralphschindler/example.php
Zend\Db\Sql\Select example usage
<?php
use Zend\Db\Sql\Select;
// basic table
$select0 = new Select;
$select0->from('foo');
// 'SELECT "foo".* FROM "foo"';
@vrkansagara
vrkansagara / spider.php
Created October 25, 2017 14:06 — forked from ralphschindler/spider.php
Script to be used with PHP's built-in webserver to proxy and spider a site on click
<?php
// start PHP with: php -S localhost:8888 -t . spider.php
$site = 'http://www.targetwebsite.org/';
$path = $_SERVER["REQUEST_URI"];
if ($path == '/') {
$path = '/index.html';
<?php
setup();
$t = new Tree('top', 'T');
$t->append(new TreeNode('one', 1));
$t->append($x = new TreeNode('two', 2));
$t->append(new TreeNode('three', 3));
$t->append(new TreeNode('foo', 'foo'));
@vrkansagara
vrkansagara / tree.php
Created October 25, 2017 14:06 — forked from ralphschindler/tree.php
'tree' console command, in PHP.
#!/usr/bin/php
<?php
/**
* Because you want "tree", but cannot find the source code quick enough
* on the web to compile for OS.X or there is no suitable implementation
* on windows.
*/
// set error reporting
error_reporting(E_STRICT | E_ALL);
@vrkansagara
vrkansagara / beanstalkd.conf
Created July 13, 2017 00:13 — forked from seyhunak/beanstalkd.conf
Beanstalkd - Supervisord
### /etc/supervisor/conf.d/beanstalkd.conf
[program:beanstalkd]
command=/usr/local/bin/beanstalkd.sh
directory=/home/rails
user=ubuntu
startsecs=10
autostart=true
autorestart=true
stdout_logfile=/var/log/supervisor/beanstalkd.log
@vrkansagara
vrkansagara / letsencrypt.yourdomain.conf
Created April 4, 2017 20:09 — forked from nwgat/letsencrypt.yourdomain.conf
lighttpd letsencrypt ssl conf
combine files into ssl.pem
sudo su (login as root)
cd /etc/letsencrypt/live/yourdomain
cat privkey.pem cert.pem > ssl.pem
Forward Secrecy & Diffie Hellman Ephemeral Parameters
cd /etc/ssl/certs
openssl dhparam -out dhparam.pem 4096
Copy and paste the following into /etc/lighttpd/lighttpd.conf dont forget to change yourdomain to your domain
@vrkansagara
vrkansagara / centos7_ambiente_desenvolvimento.md
Created March 27, 2017 03:34 — forked from marciopaiva/centos7_ambiente_desenvolvimento.md
CentOS 7 - Apache 2.4 + MOD_PROXY_FCGI + PHP-FPM 5.5 + InstantClient Oracle.

CentOS 7 - Apache 2.4 + PHP-FPM 5.5 + InstantClient Oracle.


Montando uma VM para o desenvolvimento de aplicações em PHP, utilizado o CentOS 7

@vrkansagara
vrkansagara / crypt.php
Created February 24, 2017 16:01 — forked from leonjza/crypt.php
Laravel Crypt encryptor / decryptor.
<?php
/*
* Quick 'n Dirty Laravel 5.1 decrypter.
*
* Based directly off the source code at:
* https://github.com/laravel/framework/blob/5.1/src/Illuminate/Encryption/Encrypter.php
*
* Have access to an application key from a .env?
* Have some encrypted data you want to decrypt?
* Well: (new Crypt($key))->decrypt($payload); should have you sorted
@vrkansagara
vrkansagara / iterm2-solarized.md
Created January 26, 2017 07:50 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k