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 -e | |
# a script that extracts the subtitle file of every mkv movie file and saves it with the same name | |
# copy to the folder where the mkv files live and run "./mkvextractTracks.sh" in terminal | |
# options: [trackID] | |
# example: ./mkvextractTracks.sh 1 | |
# | |
# info: | |
# mkvextract is used to extract the subtitles, so mkvtoolnix app (which contains the mkvextract binary) is used: | |
# https://mkvtoolnix.download/downloads.html |
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
setTimeout(function(){debugger;}, 5000) |
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
nvm install lts/* --reinstall-packages-from=node |
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
objStringFromBufferGeometry: function (geom) { | |
var s = ''; | |
var geometry = new THREE.Geometry().fromBufferGeometry( geom ); | |
for (var i = 0; i < geometry.vertices.length; i++) { | |
var vertex = geometry.vertices[i]; | |
s += 'v '+ vertex.x + ' ' + vertex.y + ' '+ vertex.z + '\n'; | |
} | |
for (var i = 0; i < geometry.faces.length; i++) { | |
s += 'f '+ (geometry.faces[i].a+1) + ' ' + (geometry.faces[i].b+1) + ' ' + (geometry.faces[i].c+1); |
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
grip -b filename.md |
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
du -sh */ | sort -hr |
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 | |
# 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 |
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 -e | |
# batch resize @3x iOS image assets to @2x and @1x | |
# copy this script to the folder where the @3x images files live and run "./resizer3x.sh" in terminal. | |
# this will generate [filename]@2x.[extension] and [filename].[extension] images in the same folder | |
# Ensure we're running in location of script. | |
cd "`dirname $0`" |
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 -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 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) |
NewerOlder