Skip to content

Instantly share code, notes, and snippets.

View Rizwan-Hasan's full-sized avatar
🌏
Working remotely

Rizwan Hasan Rizwan-Hasan

🌏
Working remotely
View GitHub Profile
@Rizwan-Hasan
Rizwan-Hasan / config
Last active May 10, 2018 17:51 — forked from rbialek/config
ssh/.config
Host github.com
User Rizwan-Hasan
Hostname github.com
PreferredAuthentications publickey
IdentityFile /home/rizwan/.ssh/magpie.id_rsa
@Rizwan-Hasan
Rizwan-Hasan / onedark.theme
Created September 11, 2018 10:15 — forked from fluxrad/onedark.theme
A one-dark theme for xfce4-terminal
[Scheme]
Name=One Dark
ColorForeground=#ABB2BF
ColorCursor=#ABB2BF
ColorBackground=#282C34
ColorSelection=#3B4451
ColorSelectionUseDefault=FALSE
ColorBold=#B9C0CB
ColorBoldUseDefault=FALSE
ColorPalette=#282C34;#E06C75;#98C379;#E5C07B;#61AFEF;#C678DD;#56B6C2;#ABB2BF;#3E4452;#BE5046;#98C379;#D19A66;#61AFEF;#C678DD;#56B6C2;#5C6370
@Rizwan-Hasan
Rizwan-Hasan / uefisetup.sh
Created January 10, 2019 19:54 — forked from Apsu/uefisetup.sh
Arch Linux UEFI Setup
# **************** READ THIS FIRST ******************
#
# This is not a script for you to run. I repeat, do not download and run this!
#
# This is only a guide to show the required steps for successful UEFI + GRUB2 installation
# Many of the choices are examples or assumptions; don't blindly type shit into your machine
# until/unless you at least read the comments around each command
#
# These steps assume you've booted in UEFI mode by preparing your USB stick per these instructions:
# https://wiki.archlinux.org/index.php/UEFI#Archiso
@Rizwan-Hasan
Rizwan-Hasan / git-clearHistory
Created June 2, 2019 13:48 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
@Rizwan-Hasan
Rizwan-Hasan / README.md
Created June 6, 2019 16:16 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

All hex value from 100% to 0% alpha:

@Rizwan-Hasan
Rizwan-Hasan / fix-git-line-endings
Created August 30, 2019 21:56 — forked from ajdruff/fix-git-line-endings
Forces all line endings to LF in your git repo.
#####################
#
# Use this with or without the .gitattributes snippet with this Gist
# create a fixle.sh file, paste this in and run it.
# Why do you want this ? Because Git will see diffs between files shared between Linux and Windows due to differences in line ending handling ( Windows uses CRLF and Unix LF)
# This Gist normalizes handling by forcing everything to use Unix style.
#####################
# Fix Line Endings - Force All Line Endings to LF and Not Windows Default CR or CRLF
import requests
def main():
userName: str = 'magpie-robins' # User name of the repository
repoName: str = 'gpa-calculator-android' # Repository name
releaseTag: str = 'latest' # Using tag 'latest' for latest released download count
url: str = "https://api.github.com/repos/{0}/{1}/releases/{2}" # API URL
response = requests.get(url.format(userName, repoName, releaseTag)) # Sending HTTP GET request on API URL
data: dict = response.json() # Converting received data to JSON format
# The JSON file contains huge data about that release.
/*
Filename: GitApi.java
Used module from https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple/1.1.1
*/
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Total Download</title>
</head>
<body>
<p style="font-size: 500%; text-align: center">Total Downloads:</p>
<p id="download" style="font-size:1000%; text-align: center"></p>
<script type="text/javascript">
/*
Used module from https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple/1.1.1
*/
import org.json.simple.JSONArray
import org.json.simple.JSONObject
import org.json.simple.parser.JSONParser
import java.net.URL
import java.nio.charset.Charset