Skip to content

Instantly share code, notes, and snippets.

View bloodyburger's full-sized avatar

bloodyburger bloodyburger

View GitHub Profile
@bloodyburger
bloodyburger / jquery-table-move
Created October 31, 2014 14:01
Move table rows across tables in JQuery
Table Source Code
<table id="table1" style="background-color: Lime" class="displayTable">
<caption>Table 1</caption>
<thead>
<tr>
<th>One</th>
<th>Two</th>
<th>Three</th>
</tr>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="http://d3js.org/d3.v3.min.js"></script>
<style>
.chart div {
Verifying my Blockstack ID is secured with the address 17KYHat88VCRCFVe2RqecqoxUZX8aHHaaz https://explorer.blockstack.org/address/17KYHat88VCRCFVe2RqecqoxUZX8aHHaaz
@bloodyburger
bloodyburger / INSTALL.md
Created July 3, 2018 08:29 — forked from arya-oss/INSTALL.md
Ubuntu 16.04 Developer Tools installation

Ubuntu 16.04 Developer Tools Installation

First things first !

sudo apt update
sudo apt upgrade

Standard Developer Tools

sudo apt-get install build-essential git
@bloodyburger
bloodyburger / nginxproxy.md
Created July 3, 2018 08:52 — forked from arya-oss/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@bloodyburger
bloodyburger / DES.py
Created July 3, 2018 08:52 — forked from arya-oss/DES.py
Data Encryption Standard
#!/usr/bin/env python
p_table_1 = [
[57,49,41,33,25,17, 9],
[ 1,58,50,42,34,26,18],
[10, 2,59,51,43,35,27],
[19,11, 3,60,52,44,36],
[63,55,47,39,31,23,15],
[ 7,62,54,46,38,30,22],
[14, 6,61,53,45,37,29],
@bloodyburger
bloodyburger / 2048.cpp
Created July 3, 2018 08:52 — forked from arya-oss/2048.cpp
2048 puzzle game
#include <bits/stdc++.h>
#include <unistd.h>
using namespace std;
int USER = 1;
int COMPUTER = 0;
#define LEFT 0
#define RIGHT 1
#define UP 2
@bloodyburger
bloodyburger / WireguardTunnel.md
Last active November 25, 2021 00:06
Multi-site VPN tunnel using Wireguard

Create secure tunnel and interlink all your servers using Wireguard

WireGuard is a simple, fast, and secure VPN that utilizes state-of-the-art cryptography. With a small source code footprint, it aims to be faster and leaner than other VPN protocols such as OpenVPN and IPSec. WireGuard is still under development, but even in its unoptimized state it is faster than the popular OpenVPN protocol. You can read more about Wireguard and its code from github repository but here we will quickly see how to establish site-site VPN tunnel in easy steps unlike other protocols which takes more effort to configure and establish multi-site tunnel.

I followed this to install and connect all sites that I use which are at different locations across the globe.

Let's assume we have 4 sites at different locations - NY,LA,SH,DE, we will name these sites S1,S2,S3 and S4. We will treat S1 to be the main entry point to which we can establish a public connection and access resources

@bloodyburger
bloodyburger / ufw_plex.md
Created January 1, 2021 18:01 — forked from nmaggioni/ufw_plex.md
Plex Media Server UFW rule

/etc/ufw/applications.d/plexmediaserver

[plexmediaserver]
title=Plex Media Server (Standard)
description=The Plex Media Server
ports=32400/tcp|3005/tcp|5353/udp|8324/tcp|32410:32414/udp

[plexmediaserver-dlna]
title=Plex Media Server (DLNA)
description=The Plex Media Server (additional DLNA capability only)
@bloodyburger
bloodyburger / iowa_mysql
Created April 19, 2021 07:35
Iowa Liquor Sales Dataset to MySQL
## Download
https://mydata.iowa.gov/Sales-Distribution/Iowa-Liquor-Sales-by-Year-and-County/ahiv-u4uz
## mysql
CREATE TABLE `iowaalcohol` (
`DATE` date DEFAULT NULL,
`CONVENIENCE STORE` varchar(255) DEFAULT NULL,
`STORE` varchar(12) DEFAULT NULL,
`NAME` varchar(255) DEFAULT NULL,
`ADDRESS` varchar(255) DEFAULT NULL,