Skip to content

Instantly share code, notes, and snippets.

View yazdipour's full-sized avatar
:shipit:
Make Us Great Again

Shahriar yazdipour

:shipit:
Make Us Great Again
View GitHub Profile
@yazdipour
yazdipour / text2speech.py
Created October 5, 2017 21:02
Preparing for IELTS Listening Numbers
import win32com.client as wincl
import random
from time import sleep
speak = wincl.Dispatch("SAPI.SpVoice")
problems=[13,30,4,14,40,5,15,50,6,16,60,70,17,'seventh','sixth','fifth','fourth']
while True:
rnd=str(random.choice(problems))
speak.Speak(rnd)
@yazdipour
yazdipour / labels_1024.tsv
Created October 11, 2017 12:16 — forked from teamdandelion/labels_1024.tsv
TensorBoard: TF Dev Summit Tutorial
We can make this file beautiful and searchable if this error is corrected: No tabs found in this TSV file in line 0.
7
2
1
0
4
1
4
9
5
9
@yazdipour
yazdipour / breachcompilation.txt
Created December 21, 2017 21:47
1.4 billion password breach compilation wordlist
wordlist created from original 41G stash via:
grep -rohP '(?<=:).*$' | uniq > breachcompilation.txt
Then, compressed with:
7z a breachcompilation.txt.7z breachcompilation.txt
Size:
# using:
# for set proxy:
# $ setproxy 127.0.0.1 8118
# for unset:
# $ unsetproxy
function setproxy() {
export {http,https,ftp,HTTP,HTTPS}_proxy=http://$1:$2
export no_proxy="localhost,127.0.0.1,master.cafecluster"
echo "Proxy variable(http,https,ftp) set to $1:$2"
@yazdipour
yazdipour / README.md
Created April 5, 2018 15:33 — forked from MoOx/README.md
How to keep in sync your Git repos on GitHub, GitLab & Bitbucket easily
title tags authors
How to keep in sync your Git repos on GitHub, GitLab & Bitbucket easily
git
github
gitlab
bitbucket
MoOx
@yazdipour
yazdipour / gist:d7e2e64696a19d8bddd272bb9f611933
Created April 30, 2018 08:05 — forked from stuart11n/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@yazdipour
yazdipour / UTM.java
Last active September 15, 2023 12:40
UTM, WGS84 Converter
import java.util.Locale;
/**
* Class representing UTM-coordinates. Based on code from stack overflow.
* @see <a href="https://stackoverflow.com/questions/176137/java-convert-lat-lon-to-utm">Stack Overflow</a>
* @see <a href="https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system">Wikipedia-entry on UTM</a>
* @author Rolf Rander
*/
public class UTM
{
# 05_h.png >> 05_half.png
for file in *.png; do mv "$file" "${file/_h.png/_half.png}"; echo $f;done
# * >> *.mp4
for file in *; do mv "$file" "$file.mp4";done
# */*/ -rec >> remove *.pdf && *.doc
IFS=$'\n'; set -f ## To skip problem of directories with spaces
for f in $(find . -name '*.pdf' -or -name '*.doc'); do rm "$f"; echo $f;done
unset IFS; set +f
var config={
homeURL:'https://www.dideo.ir',
updatePageURL: 'http://blog.dideo.ir/?p=629',
installURL:'http://blog.dideo.ir/?p=218'
};
var enable = kango.storage.getItem('enable');
if (enable == undefined){
enable = true;
kango.storage.setItem('enable', true);
// Code for website
// This is the "Offline page" service worker
//Add this below content to your HTML page, or add the js file to your page at the very top to register service worker
if (navigator.serviceWorker.controller) {
console.log('[PWA Builder] active service worker found, no need to register')
} else {
//Register the ServiceWorker
navigator.serviceWorker.register('pwabuider-sw.js', {
scope: './'