Skip to content

Instantly share code, notes, and snippets.

View rahulvramesh's full-sized avatar
💻
🚊

Rahul V Ramesh rahulvramesh

💻
🚊
View GitHub Profile
@rahulvramesh
rahulvramesh / install.sh
Last active October 14, 2018 09:41
KVM + Ubuntu 16
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install qemu qemu-kvm libvirt-bin virtinst bridge-utils cpu-checker
kvm-ok
sudo cp /etc/network/interfaces /etc/network/interfaces.bakup-1-july-2016
sudo vi /etc/network/interfaces
@rahulvramesh
rahulvramesh / openvpn-step-1.sh
Last active March 4, 2019 10:56
Setup OpenVPN and IPsec/L2TP Services In Single VPS Server Using Docker - Part 1
OVPN_DATA=`ovpn-data-example`
docker volume create - name $OVPN_DATA
docker run -v $OVPN_DATA:/etc/openvpn - log-driver=none - rm kylemanna/openvpn ovpn_genconfig -u udp://VPN.SERVERNAME.COM
#udp://VPN.SERVERNAME.COM` replace the value with your domain or IP
docker run -v $OVPN_DATA:/etc/openvpn - log-driver=none - rm -it kylemanna/openvpn ovpn_initpki
docker run -v $OVPN_DATA:/etc/openvpn -d -p 1194:1194/udp - cap-add=NET_ADMIN kylemanna/openvpn
#Here replace **CLIENTNAME** with your name, in my case lets say `dotlogger`.
docker run -v $OVPN_DATA:/etc/openvpn - log-driver=none - rm -it kylemanna/openvpn easyrsa build-client-full CLIENTNAME nopass
docker run -v $OVPN_DATA:/etc/openvpn - log-driver=none - rm -it kylemanna/openvpn easyrsa build-client-full dotlogger nopass
docker run -v $OVPN_DATA:/etc/openvpn - log-driver=none - rm kylemanna/openvpn ovpn_getclient CLIENTNAME > CLIENTNAME.ovpn
#--------- Docker Install -------------
sudo apt-get update
sudo apt-get install curl apt-transport-https ca-certificates software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
<?php
/**
* Sets up the default filters and actions for most
* of the WordPress hooks.
*
* If you need to remove a default hook, this file will
* give you the priority for which to use to remove the
* hook.
*
* Not all of the default hooks are found in default-filters.php
@rahulvramesh
rahulvramesh / class-wp-customize-manager.php
Last active April 8, 2019 08:12
class-wp-customize-manager.php
<?php
/**
* WordPress Customize Manager classes
*
* @package WordPress
* @subpackage Customize
* @since 3.4.0
*/
/**
@rahulvramesh
rahulvramesh / wp-config.php
Created April 10, 2019 07:28
wp-config.php
<?php
/**
* The base configuration for WordPress
*
* The wp-config.php creation script uses this file during the
* installation. You don't have to use the web site, you can
* copy this file to "wp-config.php" and fill in the values.
*
* This file contains the following configurations:
*
@rahulvramesh
rahulvramesh / cleanup.sh
Created April 13, 2019 18:53 — forked from superseb/cleanup.sh
Cleanup host added as custom to Rancher 2.0
#!/bin/sh
docker rm -f $(docker ps -qa)
docker volume rm $(docker volume ls -q)
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico /opt/rke"
for dir in $cleanupdirs; do
echo "Removing $dir"
rm -rf $dir
done
package main
import "fmt"
func main() {
var (
nthNumber, count, num int
)