Skip to content

Instantly share code, notes, and snippets.

View brunocassol's full-sized avatar

Bruno Cassol brunocassol

View GitHub Profile
@bryanbarnard
bryanbarnard / SimpleHttpClient.cs
Created December 23, 2013 19:15
Simple C# .NET 4.5 HTTPClient Request Using Basic Auth and Proxy
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net.Http;
using System.Net;
namespace HTTP_Test
@ziadoz
ziadoz / scrape.php
Created August 13, 2012 21:54
Scraping Google using PHP and Goutte:
<?php
/**
* Todo: Send a random user agent string and sleep a random amount between requests.
*/
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
// Extract and sanatize input:
$domain = filter_input(INPUT_POST, 'domain', FILTER_SANITIZE_URL);
$terms = filter_input(INPUT_POST, 'terms', FILTER_SANITIZE_STRING);
// Setup Goutte (which also includes Guzzle):
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@mattattui
mattattui / hash_pbkdf2.php
Last active May 17, 2016 09:23
PHP PBKDF2 implementation
<?php
/* PHP PBKDF2 implementation
*
* PBKDF2 is a key derivation function defined in RFC2898. It's used to
* generate longer and more secure passwords from short, human-entered
* passwords. The number of rounds can be increased to keep ahead of
* improvements in CPU/GPU performance.
*
* You should use a different salt for each password (it's safe to store it