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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# ============================================================================= | |
# @file rename-mp3.py | |
# @author Albert Puig (albert.puig@cern.ch) | |
# @date 27.02.2018 | |
# ============================================================================= | |
"""MP3 file renamer""" | |
import os |
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
$ brew config | |
HOMEBREW_VERSION: 1.2.1 | |
ORIGIN: https://github.com/Homebrew/brew | |
HEAD: ea8be174f6009bc9bdec67b13ca501b5b83fc4b8 | |
Last commit: 11 days ago | |
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core | |
Core tap HEAD: 2856b9e1e89fba013da875f7c7486379569fca46 | |
Core tap last commit: 24 minutes ago | |
HOMEBREW_PREFIX: /usr/local | |
HOMEBREW_REPOSITORY: /usr/local/Homebrew |
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
\n | |
DNS lookup : %{time_namelookup}\n | |
Connect to server (TCP) : %{time_connect}\n | |
Connect to server (HTTP/S) : %{time_appconnect}\n | |
Time from start until transfer began: %{time_pretransfer}\n | |
Time for redirection (if any) : %{time_redirect}\n | |
Total time before transfer started : %{time_starttransfer}\n | |
\n | |
Total time : %{time_total}\n | |
Size of download (bytes) : %{size_download}\n |
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
#!/usr/bin/perl | |
# From http://chneukirchen.org/blog/archive/2013/07/summer-of-scripts-f.html | |
my $field = shift or usage(); | |
$field -= 1 if $field > 0; | |
while (<>) { | |
chomp; | |
my @f = split; | |
print $f[$field], "\n"; | |
} |
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/sh | |
# | |
# Find and replace by a given list of files. | |
# | |
# replace foo bar **/*.rb | |
# | |
# From: https://github.com/thoughtbot/dotfiles/blob/master/bin/replace | |
find_this=$1 | |
shift |
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
#!/usr/bin/env zsh --login | |
# Create temp dir | |
tmp=${1-$TMPDIR} | |
tmp=$tmp/tmp.$RANDOM.$RANDOM.$RANDOM.$$ | |
(umask 077 && mkdir $tmp) || { | |
echo "Could not create temporary directory! Exiting." 1>&2 | |
exit 1 | |
} | |
# Go to it and start a new shell |
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
#!/usr/bin/env python | |
# ============================================================================= | |
# @file torrent.py | |
# @author Albert Puig (albert.puig@epfl.ch) | |
# @date 05.07.2014 | |
# ============================================================================= | |
"""Torrent file-info decoder, extracted from | |
http://effbot.org/zone/bencode.htm |
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
#!/usr/bin/env python | |
#version 2.13 | |
#author tobyrosen@gmail.com | |
#Copyright (c) 2011-2015 Toby Rosen | |
#Distributed under the New BSD License. | |
#All rights reserved. | |
#Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: |
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 | |
set -e | |
# Usage: | |
# rsync_parallel.sh [--parallel=N] [rsync args...] | |
# | |
# Options: | |
# --parallel=N Use N parallel processes for transfer. Defaults to 10. | |
# | |
# Notes: |
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
#!/usr/bin/env python | |
# @file lphe-ja.py | |
# @author Albert Puig (albert.puig@epfl.ch) | |
# @date 05.04.2013 | |
import os | |
import sys | |
import re | |
from sh import git, svn |
NewerOlder