Skip to content

Instantly share code, notes, and snippets.

View TaylanTatli's full-sized avatar
👋

Taylan Tatlı TaylanTatli

👋
View GitHub Profile
@m14t
m14t / fix_github_https_repo.sh
Created July 5, 2012 21:57
Convert HTTPS github clones to use SSH
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
echo "-- ERROR: Could not identify Repo url."
echo " It is possible this repo is already using SSH instead of HTTPS."
exit
fi
@stephenhardy
stephenhardy / git-clearHistory
Created April 26, 2013 22:14
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
@frenchesco
frenchesco / E-mail Templates.ahk
Created June 26, 2013 00:11
AutoHotkey Text Expansion for the Email Templates by Bea Kylene Jumarang for Smashing Magazine: http://www.smashingmagazine.com/2013/06/20/email-templates-web-designers-developers-pdf-odt-txt/
; ----------------------------------------------------------
; E-MAIL TEMPLATES FOR WEB DESIGNERS AND DEVELOPERS
; Prepared by Bea Kylene Jumarang for Smashing Magazine
; http://www.smashingmagazine.com/2013/06/20/email-templates-web-designers-developers-pdf-odt-txt/
; ----------------------------------------------------------
; Adapted as a Autohotkey script by Marc Gordon
; ----------------------------------------------------------
; Instructions:
; 1) Install Autohotkey.
; 2) Modify the greeting if you want in GetGreeting() below.
@jonhoo
jonhoo / slicewin
Last active June 3, 2016 21:58
Script for slicing and aerosnapping X windows in an EWMH compatible WM
#!/bin/bash
if [[ $# -eq 0 ]]; then
echo "Usage: $0 top|right|bottom|left [maximized]"
exit 1
fi
active=`xprop -root _NET_ACTIVE_WINDOW | sed 's/^.*# //'`
if [[ $active == "0x0" ]]; then
echo "No active window found (_NET_ACTIVE_WINDOW == 0x0)"
@lilydjwg
lilydjwg / ttc2ttf
Last active July 12, 2023 14:27
Convert .ttc to several .ttf files into the current directory
#!/usr/bin/env python3
import sys
import fontforge
def main(file):
for font in fontforge.fontsInFile(file):
f = fontforge.open(u'%s(%s)' % (file, font))
f.generate('%s.ttf' % font)
@Zehkul
Zehkul / Convert Script – README.md
Last active December 16, 2023 07:19
Script to quickly convert and crop videos from within mpv

#README:

This script for mpv intends to offer the fastest and simplest way to convert parts of a video—while you’re watching it and not really more work intensive than making a screenshot. A short demonstration: https://d.maxfile.ro/omdwzyhkoa.webm

##Installation:

You need:

  • yad (at least 0.26) (AUR)
@selsta
selsta / autosub.lua
Last active October 8, 2023 11:28
Automatically download subtitles in mpv using subliminal.
-- requires subliminal, version 1.0 or newer
-- default keybinding: b
-- add the following to your input.conf to change the default keybinding:
-- keyname script_binding auto_load_subs
local utils = require 'mp.utils'
function load_sub_fn()
subl = "/usr/local/bin/subliminal" -- use 'which subliminal' to find the path
mp.msg.info("Searching subtitle")
mp.osd_message("Searching subtitle")
t = {}
@justbuchanan
justbuchanan / readme.md
Last active March 1, 2021 17:21
Show icons for open programs in i3's status bar. See a demo here: http://gfycat.com/AfraidAmusingCoyote
@misterburton
misterburton / tumblr-delete-all-posts.js
Last active September 18, 2023 13:44
How to Delete All Tumblr Posts via JavaScript & the Browser Console
/*
Navitage to your mass post editor:
https://www.tumblr.com/mega-editor/[blog-name]
Open your browser's JavaScript Console and paste either of the following code snippets
*/
// delete 100 tumblr posts at a time (h/t Louis Lee: http://louisrli.github.io/blog/2013/05/11/how-to-delete-all-tumblr-posts/)
javascript:$('.overlay').slice(0, 100).click(); // you must now manually hit the 'delete' button at the top-right of the page
// delete all tumblr posts (h/t Hendry Sadrak [@hendrysadrak] a commenter on Li's above-linked post)
@devster
devster / release.sh
Created September 5, 2016 15:33
Relase git tag script
#!/bin/bash
# Script to simplify the release flow.
# 1) Fetch the current release version
# 2) Increase the version (major, minor, patch)
# 3) Add a new git tag
# 4) Push the tag
# Parse command line options.
while getopts ":Mmpd" Option