Skip to content

Instantly share code, notes, and snippets.

View lenn4rd's full-sized avatar

Lennard Timm lenn4rd

View GitHub Profile
@jacksonp
jacksonp / explain.sh
Last active September 18, 2021 15:04
Explaining Shell Commands in Bash
# Add this to ~/.bash_profile or ~/.bashrc
explain () {
if [ "$#" -eq 0 ]; then
while read -p "Command: " cmd; do
curl -Gs "https://www.mankier.com/api/v2/explain/?cols="$(tput cols) --data-urlencode "q=$cmd"
done
echo "Bye!"
elif [ "$#" -eq 1 ]; then
curl -Gs "https://www.mankier.com/api/v2/explain/?cols="$(tput cols) --data-urlencode "q=$1"
else
@betrisey
betrisey / itunes-festival.sh
Last active December 10, 2020 01:27
iTunes Festival - Download recordings
  1. Get your cookie. Either proxy your iPhone/iPod/iPad and record the cookie using the proxy server of your choice or capture the request using your AP with Wireshark or similar

  2. Make sure you have a cookie like token=expires=1409714101~access=/auth/*~md5=2d4466c1...

  3. Find the day of the artist you want to load (e.g. 01, 02, 10, 25) Find the artist on iTunes https://itunes.apple.com/us/artist/*deadmau5*/id*78011850* and take its ID and its name. Add an underscore between these two. (e.g. 78011850_deadmau5)

  4. Launch the script: sh itunes-festival.sh cookie day id_artist

    sh itunes-festival.sh "token=expires=1409714101~access=/auth/*~md5=2d4466c1" 01 78011850_deadmau5

  5. Have fun.

@tdragonite
tdragonite / HOWTO.md
Last active November 8, 2018 18:09 — forked from badboy/HOWTO.md
iTunes Festival London 2014 show downloader

**
NEW VERSION (APPLE MUSIC FESTIVAL 2015 ALSO) & UPDATE HERE -> https://github.com/tdragonite/iTunesFestivalDownloader
**
iTunes Festival Show Downloader - London 2014

  1. Find the day of the show of the artist you want to download. Look at: http://www.itunesfestival.com
  2. Give execution permission to the script: chmod 777 itunes-festival.sh
  3. Launch the script: ./itunes-festival.sh day artist <br > Please, remember: NO SPACE IN THE ARTIST NAME!
    F.e: Tony Bennett = tonybennett, The Script = thescript. Thanks! <br > Examples: ./itunes-festival.sh 06 tonybennett <br > ./itunes-festival.sh 15 thescript <br >
  4. Have fun!
    Additional note:
@UniIsland
UniIsland / README.md
Last active September 22, 2021 09:28
Mnemonic Wordlist

This word list is recommended by MNX.io in the article A Proper Server Naming Scheme.

Usage

Choose a word at will from the word list below.

The easiest way to randomly get a word from the wordlist on Linux is:

shuf -n 1 $FILENAME
@pricees
pricees / Ruby Database Url -> Config YAML
Last active March 9, 2021 12:09
Rails database connection, url to yaml
#########################################################
#
# This method takes a db connection url and returns rails
# config YAML
#
##########################################################
require "uri"
require "yaml"
@pcreux
pcreux / Gemfile
Last active December 11, 2023 20:24
Fast Rails + Heroku Configuration
group :production do
gem 'unicorn'
# Enable gzip compression on heroku, but don't compress images.
gem 'heroku-deflater'
# Heroku injects it if it's not in there already
gem 'rails_12factor'
end
@SabretWoW
SabretWoW / rspec_model_testing_template.rb
Last active March 7, 2024 03:56
Rails Rspec model testing skeleton & cheat sheet using rspec-rails, shoulda-matchers, shoulda-callbacks, and factory_girl_rails. Pretty much a brain dump of examples of what you can (should?) test in a model. Pick & choose what you like, and please let me know if there are any errors or new/changed features out there. Reddit comment thread: http…
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:
@badboy
badboy / HOWTO.md
Last active March 24, 2018 00:17
iTunes Festival - Download recordings
  1. Get your cookie. Either proxy your iPhone/iPod/iPad and record the cookie using the proxy server of your choice or capture the request using your AP with Wireshark or similar
  2. Make sure you have a cookie like AKCNTYPE=WIFI; AKID=abc; token=expires... and put it in ~/cookie
  3. Find the name and day of the artist you want to load, replace whitespace with underscores.
  4. Launch the script: ./itunes-festival.sh day artist
  5. Have fun.

and because I'm not the creator of this script: henne war's!

@tonycoco
tonycoco / tm2-bundles
Created September 14, 2012 17:01
TextMate 2 Bundles
These are some needed bundles for TM2...
cd ~/Library/Application Support/Avian/Bundles
git clone https://github.com/cucumber/cucumber-tmbundle Cucumber.tmbundle
git clone https://github.com/kuroir/SCSS.tmbundle
git clone https://github.com/mads379/Whitespace.tmbundle
open Cucumber.tmbundle/color_themes/Sunburst.tmTheme
@jtimberman
jtimberman / knife.rb
Created February 1, 2012 19:33
Commented knife.rb for all the things
# Knife Configuration File.
#
# This is a Ruby DSL to set configuration parameters for Knife's
# general options. The default location for this file is
# ~/.chef/knife.rb. If multiple Chef repositories are used,
# per-repository configuration files can be created. A per repository
# configuration file must be .chef/knife.rb in the base directory of
# the Chef repository. For example,
#
# ~/Development/chef-repo/.chef/knife.rb