Skip to content

Instantly share code, notes, and snippets.

View vzool's full-sized avatar
🎯
Focusing

Abdelaziz Elrashed vzool

🎯
Focusing
View GitHub Profile
// Playground - noun: a place where people can play
import Foundation
import UIKit
import XCPlayground
XCPSetExecutionShouldContinueIndefinitely(continueIndefinitely: true)
// ----- GET -----
package com.example.megam.banksevs;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
@vzool
vzool / Documentation.md
Created May 8, 2016 03:03 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@vzool
vzool / forward_clients.sh
Last active June 30, 2016 21:40
iptables Rules to forward clients into openvpn tunnel (WiFi Pineapple)
#!/bin/bash
iptables -t nat -A POSTROUTING -s 172.16.42.0/24 -o tun0 -j MASQUERADE
iptables -A FORWARD -s 172.16.42.0/24 -o tun0 -j ACCEPT
iptables -A FORWARD -d 172.16.42.0/24 -m state --state ESTABLISHED,RELATED -i tun0 -j ACCEPT
@vzool
vzool / openvpn-server-setup
Created July 10, 2016 18:37
OpenVPN Server Installiation (Hard & Free Way)
Install and setup OpenVPN
apt-get update; apt-get install openvpn easy-rsa
gunzip -c /usr/share/doc/openvpn/examples/sample-config-files/server.conf.gz /etc/openvpn/server.conf
nano /etc/openvpn/server.conf
replace dh1024.pem with dh2048.pem
#uncomment push "redirect-gateway def1 bypass-dhcp"

Keybase proof

I hereby claim:

  • I am vzool on github.
  • I am vzool (https://keybase.io/vzool) on keybase.
  • I have a public key whose fingerprint is 2F5B CE0A 8E90 955C DA57 3DCC CDD3 345B 00DE 3461

To claim this, I am signing this object:

<!-- country codes (ISO 3166) and Dial codes. -->
<select name="countryCode" id="">
<option data-countryCode="GB" value="44" Selected>UK (+44)</option>
<option data-countryCode="US" value="1">USA (+1)</option>
<optgroup label="Other countries">
<option data-countryCode="DZ" value="213">Algeria (+213)</option>
<option data-countryCode="AD" value="376">Andorra (+376)</option>
<option data-countryCode="AO" value="244">Angola (+244)</option>
<option data-countryCode="AI" value="1264">Anguilla (+1264)</option>
<option data-countryCode="AG" value="1268">Antigua &amp; Barbuda (+1268)</option>
@vzool
vzool / cacert.pem
Created November 24, 2016 09:24 — forked from HTMLGuyLLC/cacert.pem
cacert.pem to create a secure connection to APIs
##
## ca-bundle.crt -- Bundle of CA Root Certificates
##
## Certificate data from Mozilla as of: Sat Dec 29 20:03:40 2012
##
## This is a bundle of X.509 certificates of public Certificate Authorities
## (CA). These were automatically extracted from Mozilla's root certificates
## file (certdata.txt). This file can be found in the mozilla source tree:
## http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1
##
@vzool
vzool / renew-cert.sh
Last active November 30, 2016 18:17
Script to update and install Let's Encrypt Automatically using "certbot"
#!/bin/bash
certbot renew --standalone --pre-hook "systemctl stop httpd" --post-hook "systemctl start httpd"
# Cron job by command(crontab -e)
# -------------------------
# 0 */12 * * * /root/renew-cert.sh > /dev/null 2>&1
# Apache option
# -------------------------
@vzool
vzool / config
Created December 27, 2016 16:45
~/.ssh/config
Host testgithub
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_testgithub