Skip to content

Instantly share code, notes, and snippets.

@mishudark
mishudark / deleteComments.sh
Created November 13, 2010 22:48
Elimina todos los comentarios (no usar con js comprimido tipo jquery.min.js
#!/bin/bash
#mishudark <mishudark@astrata.com.mx> <moonsadly@gmail.com>
#thanks ostermiller.org to amazing regex
#
# delete_comments.sh
#
# Copyright 2010 mishudark <mishudark@astrata.com.mx> <moonsadly@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ethnt
ethnt / Media.markdown
Created December 10, 2011 03:29
All of the media.

This is all the media that I would like, have but need to be converted to *.m4a or *.m4v, and holes in my collection. To see what I currently do have, look at Tree.txt.

In order to create the directory tree, use the following command in the Media directory.

ls -R | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/   /' -e 's/-/|/' > Tree.txt && mv Tree.txt .Manifest/

Music

  • Disney Parks — Disney's Electrical Parade
<?php
echo file_get_contents('http://tinyurl.com/api-create.php?url='.'http://www.example.com/');
/* For example
http://tinyurl.com/api-create.php?url=http://www.fullondesign.co.uk/
Would return:
http://tinyurl.com/d4px9f
*/
?>
@rcoup
rcoup / rsync_parallel.sh
Created April 10, 2013 21:52
Parallel-ise an rsync transfer when you want multiple concurrent transfers happening,
#!/bin/bash
set -e
# Usage:
# rsync_parallel.sh [--parallel=N] [rsync args...]
#
# Options:
# --parallel=N Use N parallel processes for transfer. Defaults to 10.
#
# Notes:
@theiostream
theiostream / CountryCode.h
Created June 26, 2013 21:15
Get a country code from Apple's StoreFront IDs.
// CountryCode.h
// (c) 2013 Bacon Coding Company, LLC.
// Licensed under the MIT License.
// I lost my time scripting this dictionary in Python than I'd have writing it.
// Regardless, it was some fun.
#import <Foundation/Foundation.h>
// Reference: http://www.apple.com/itunes/affiliates/resources/documentation/linking-to-the-itunes-music-store.html#appendix
@clayton
clayton / ffmpeg-install.sh
Created August 9, 2013 18:55
Install FFMPEG on OS X with HomeBrew to convert Mp4 to WebM
# Installation
brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid
# Easy Peasy
ffmpeg -i video.mp4 video.webm
@dchomicz
dchomicz / api-test.php
Created January 16, 2014 19:29
Shorte.st Sample API usage
<?php
$curl_url = "https://api.shorte.st/s/CHANGE_TO_YOUR_TOKEN/facebook.com";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $curl_url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);
$array = json_decode($result);
@mossspence
mossspence / JSON.mte
Last active October 23, 2023 10:01 — forked from jmorenoamor/JSON.mte
MP3Tag export script for generating a JSON, updated for my usage and JSONLint validation
$filename(json,utf-8){$loop(%_filename_ext%)$puts(CountMax,%_counter%)$loopend()
"numSongs": $get(CountMax),
"songs": '['
$loop(%_filename_ext%) {
"title": "%title%",
"album": "%album%",
"artist": "%artist%",
"album_artist": "%albumartist%",
"composer": "$meta(composer,1)",
"publisher": "%publisher%",
@anderZubi
anderZubi / transmission_install.sh
Last active March 8, 2024 06:29
Script to install Transmission BitTorrent client in WD MyCloud NAS
#!/bin/bash
echo Backing up your sources.list...
cp /etc/apt/sources.list /etc/apt/sources.list.bak
echo Adding the sid repo to sources.list...
echo deb http://ftp.us.debian.org/debian/ sid main >> /etc/apt/sources.list
echo Updating the sid packages list...
apt-get update