This file contains hidden or 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
| git filter-branch --prune-empty --index-filter 'git rm -rf --cached --ignore-unmatch MY-BIG-DIRECTORY-OR-FILE' --tag-name-filter cat -- --all |
This file contains hidden or 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 -e | |
| # convert vector pdf to iOS image assets | |
| # copy this script to the folder where the pdf files live and run "./convertPDFToPNG3x.sh" in terminal. | |
| # this will generate [filename]@3x.png, [filename]@2x.png and [filename].png images in the same folder | |
| # Ensure we're running in location of script. | |
| cd "`dirname $0`" |
This file contains hidden or 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
| cd $1 | |
| for file in *.{JPG,jpg} | |
| do date=$(stat -f %B $file) | |
| dateFormatted=$(date -r $date +%Y-%m-%d' '%H.%M.%S) | |
| mv $file "$dateFormatted.jpg" | |
| done | |
| for file in *.{MOV,mov} | |
| do date=$(stat -f %B $file) |
This file contains hidden or 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
| du -h -d 1 | grep '[0-9]G\>' |
This file contains hidden or 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
| #!/usr/bin/python | |
| # -------------------------------------------------------------------------- | |
| # | |
| # -------------------------------------------------------------------------- | |
| #import evdev | |
| from evdev import InputDevice, categorize, ecodes | |
| from subprocess import call | |
| #creates object 'gamepad' to store the data |
This file contains hidden or 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
| http://loopstream01.apa.at/?channel=oe1&shoutcast=0&ua=flash&id=[loopStreamId] | |
| e.g. | |
| http://loopstream01.apa.at/?channel=oe1&shoutcast=0&ua=flash&id=2019-09-08_1405_tl_51_7DaysSun21_1069721.mp3 |
This file contains hidden or 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
| # cd $1 | |
| for file in *.{JPG,jpg,JPEG,jpeg} | |
| do date=$(stat -f %B $file) | |
| dateFormatted=$(date -r $date +%Y-%m-%d' '%H.%M.%S) | |
| mv $file "$dateFormatted.jpg" | |
| done | |
| for file in *.{PNG,png} | |
| do date=$(stat -f %B $file) |
This file contains hidden or 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 os, time | |
| from stat import * # ST_SIZE etc | |
| from os import walk | |
| import datetime | |
| extensions = [".jpeg", ".jpg", ".png", ".mov", ".aae", ".mp4"] | |
| files = [] | |
| for (dirpath, dirnames, filenames) in walk("./"): | |
| files.extend(filenames) |
This file contains hidden or 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
| du -sh */ | sort -hr |
This file contains hidden or 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 | |
| # dump-tables-mysql.sh | |
| # Descr: Dump MySQL table data into separate SQL files for a specified database. | |
| # Usage: Run without args for usage info. | |
| # Author: @Trutane | |
| # Ref: http://stackoverflow.com/q/3669121/138325 | |
| # Notes: | |
| # * Script will prompt for password for db access. | |
| # * Output files are compressed and saved in the current working dir, unless DIR is |