Skip to content

Instantly share code, notes, and snippets.

View mhamzas's full-sized avatar

Hamza Siddiqui mhamzas

View GitHub Profile
@mhamzas
mhamzas / index.html
Created July 11, 2020 23:43 — forked from jrue/index.html
HTML & CSS Wheel Of Fortune / Bingo Game
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Wheel of Fortune Bingo</title>
<!--
MIT License
@mhamzas
mhamzas / ApexFileUpload.cls
Created July 2, 2020 12:40 — forked from aptkdev/ApexFileUpload.cls
Apex File File Upload (Using ContentVersion)
/*
* @class FileUploaderClass
* @desc Lets you uplaod a file in Salesforce by giving a base64 string of the
* file, a name for the file, and the Id of the record that you want to attach
* the file to.
*
* @example:
* FileUploaderClass.uploadFile(myBase64String, 'Invoice.pdf', '906F0000000kG2UIAU')
*/
public class FileUploaderClass {
@mhamzas
mhamzas / childComponentWithMethod.cmp
Created June 17, 2020 15:10 — forked from pozil/childComponentWithMethod.cmp
Lightning - Passing data down the component hierarchy via a method
<aura:component >
<aura:method name="myMethod" action="{!c.executeMyMethod}">
<aura:attribute name="param1" type="String"/>
<aura:attribute name="param2" type="String"/>
</aura:method>
</aura:component>
@mhamzas
mhamzas / Workarounds for Netflix and the blocking of IPv6 tunnels.md Prevent proxy/VPN streaming error messages from Netflix when using an IPv6 tunnelf

Workarounds for Netflix and the blocking of IPv6 tunnels

The dreaded "You seem to be using an unblocker or proxy." error message. Cool story bro.

This gist was essentially created out of my own rant about Netflix being hostile to IPv6 tunnel services since June 2016. You are welcome to read my opinion on the matter, this is the more technical side to the issue and how to combat it within your own network.

Since I wrote this, various GitHub users have contributed their thoughts and ideas which has been incorporated into this gist. Thank you to everyone who have contributed their own methods and implementations.

The problem

Netflix now treats IPv6 tunnel brokers (such as Hurricane Electric) as proxy servers. A while ago it became apparent to users and Netflix that somewhat by accident, IPv6 tunnel users were being served content outside of their geolocation because of the way Netflix was identifying the tunnel servi

@mhamzas
mhamzas / backup.sh
Created May 3, 2020 16:24 — forked from sutlxwhx/backup.sh
Backup all your MySQL / MariaDB databases with rclone
#!/usr/bin/env bash
# To run this script you need to install https://rclone.org/ first
# Use current date and time for future backup folder name
TIMESTAMP=$(date +"%Y-%m-%d_%H-%M-%S")
# Declare the directory where the temporary backup files will be stored
BACKUP_DIR="/backup/$TIMESTAMP/mysql"
# State the username for your MySQL / MariaDB instace that can access the neccessary databases
MYSQL_USER=""
# Point this script to mysql executable file
MYSQL=/usr/bin/mysql
@mhamzas
mhamzas / Balsamiq mockups Serial
Last active April 30, 2020 15:06
Only working version is 3.x.x
Organization name: [email protected]
Serial Key: eNrzzU/OLi0odswsqslJTa3IzHJIz03MzNFLzs+tMTQyNrcwsTQyAIEa5xpDAIFxDy8k
Download : https://balsamiq.com/wireframes/desktop/archives/?prefix=obsolete/mockups-desktop/3.5.17/
@mhamzas
mhamzas / my.cnf
Created November 9, 2019 20:29 — forked from oinume/my.cnf
my.cnf
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
@mhamzas
mhamzas / proxmox-ve.md
Created April 4, 2019 22:09 — forked from JosefJezek/proxmox-ve.md
Proxmox VE
@mhamzas
mhamzas / DeskSample.java
Created September 11, 2018 15:29 — forked from tstachl/DeskSample.java
Example talking to the Desk.com API from Salesforce (Apex).
public class DeskSample
{
private static String OAUTH_KEY = 'youroauthkey';
private static String OAUTH_SECRET = 'youroauthsecret';
private static String ACCESS_TOKEN = 'youraccesstoken';
private static String ACCESS_TOKEN_SECRET = 'youraccesstokensecret';
public static String DESK_SITENAME = 'yoursite';
public static Void doRequest()
@mhamzas
mhamzas / MyLoginPage.apexp
Created June 22, 2018 09:13 — forked from ryanguest/MyLoginPage.apexp
Community login page [Visualforce]
apex:page controller="SiteLoginController" id="loginComponent" showheader="false" standardStylesheets="false">
<h1 style="color: gray"> Community Login </h1>
<apex:form id="loginForm" forceSSL="true">
<apex:outputPanel layout="block">
<apex:pageMessages id="error"/>
<apex:outputLabel value="{!$Label.site.username}" for="username"/>
<apex:inputText id="username" value="{!username}"/>