Skip to content

Instantly share code, notes, and snippets.

View gadiener's full-sized avatar

Gabriele gadiener

View GitHub Profile
@gadiener
gadiener / nginx.conf
Created April 24, 2018 10:18 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@gadiener
gadiener / bitcoin-pay.rb
Created February 22, 2018 15:29 — forked from Sjors/bitcoin-pay.rb
This script demonstrates how a bitcoin transaction is created and signed. Just pass in your own address and private key and it will prepare a transaction for you. You can then copy & paste that transaction into a webservice like Blockchain to send it. I wrote this mostly to understand better how it works. I sometimes had to "cheat" and look at t…
#!/usr/bin/env ruby
require 'open-uri'
require 'JSON'
require 'digest/sha2'
require 'pry'
require 'bigdecimal'
require 'bitcoin' # Because I need to cheat every now and then
# Usage:
# gem install pry json ffi ruby-bitcoin
@gadiener
gadiener / README.md
Created September 4, 2017 15:27 — forked from kopiro/tor_exit_nodes.md
ProTip: Specify country exit nodes

With TOR, you can specify the country of exit nodes to test a particular website from a specific country.

Just add these 4 lines in the torrc file.

ExitNodes {jp}
StrictNodes 1
GeoIPExcludeUnknown 1
AllowSingleHopCircuits 0

PHP OCI8 installation

Download the InstantClient from the Oracle website

  • instantclient-basic-macos.x64-VERSION.zip
  • instantclient-sqlplus-macos.x64-VERSION.zip
  • instantclient-sdk-macos.x64-VERSION.zip

Create and unzip all theses files into a the directory /opt/instantclient/VERSION

@gadiener
gadiener / test.tree.php
Created May 22, 2017 07:35 — forked from lastguest/test.tree.php
[CAFFEINA] Exercise #1
<?php
include "tree.php";
$x = new Tree();
$x->bacon = "Pancetta";
$x->pasta["fagioli"] = 3;
$y = clone $x;
$y->pasta = null;
@gadiener
gadiener / _service.md
Created March 28, 2017 14:43 — forked from naholyr/_service.md
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
@gadiener
gadiener / facebook-ticker.js
Created July 25, 2016 16:04 — forked from kopiro/facebook-ticker.js
Filter Facebook ticker stories with a RegEx
(function() {
var filterName = new RegExp(prompt("Insert the regex"), 'i');
if (!filterName) {
return alert('Invalid regex');
}
var MAX_ITERATIONS = 500;
var $profileNode = document.querySelector('[title="Profile"] > span');