This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.util.AttributeSet; | |
import android.view.View; | |
public class CircleView extends View { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#flux | |
xflux -l -35 -g -56 -k 2700 >/tmp/xflux.out | |
#xflux -l 1 -k 2700 | |
#redshift | |
redshift -o -t 2700:2700 -l 0.0:0.0 | |
#redshift -x to get normal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install python3-pip | |
sudo pip3 install send2trash | |
sudo pip3 install requests | |
sudo pip3 install beautifulsoup4 | |
sudo pip3 install selenium | |
sudo pip3 install openpyxl==2.1.4 | |
sudo pip3 install PyPDF2 | |
sudo pip3 install python-docx | |
sudo pip3 install imapclient | |
sudo pip3 install pyzmail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# debug or dev | |
keytool -exportcert -alias androiddebugkey -keystore "debug.keystore" | openssl sha1 -binary | openssl base64 | |
# release or prod | |
keytool -exportcert -alias <release_alias> -keystore "<release keystore>" | openssl sha1 -binary | openssl base64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#find current port range type | |
cat /proc/sys/net/ipv4/ip_local_port_range | |
su | |
#Set new local port range | |
echo 1024 65535 > /proc/sys/net/ipv4/ip_local_port_range |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#How to upgrade from 15.04 to 16.04 | |
#Check package avaliablity | |
#http://old-releases.ubuntu.com/ubuntu/dists/ | |
#Try this first: | |
#http://changelogs.ubuntu.com/meta-release | |
#https://help.ubuntu.com/community/EOLUpgrades | |
## EOL upgrade sources.list | |
# Required | |
#Add all deb in Software & Updates`> Other Software > Add |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#List the folder what has changed in last 5 minutes | |
find . -type f -cmin 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This gist I created to extract data from downloaded html in seperate folder, | |
#fetch one string from html file & and use that string to rename file | |
import shutil | |
import glob, os | |
from bs4 import BeautifulSoup | |
wdir=os.getcwd()+"/result/Year8k9k" | |
for fname in ["150-N","8752-8784","8790-8891","8893-8930","8933-8979","8983-9150"]: | |
os.chdir(wdir+"/"+fname) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import time | |
headers = { | |
'Referer': <your referer url>, | |
'Content-Type' : "application/x-www-form-urlencoded" | |
} | |
url=<your target url> | |
for x in range(<this was my range 11K,12K>): |
OlderNewer