Skip to content

Instantly share code, notes, and snippets.

View grzegorzblaszczyk's full-sized avatar

Grzegorz Błaszczyk grzegorzblaszczyk

View GitHub Profile
@grzegorzblaszczyk
grzegorzblaszczyk / convert_mp4_to_mp3.sh
Last active August 29, 2015 14:02
MP4 to MP3 converter
#!/bin/bash
# Quick and dirty MP4 to MP3 converter
# by Grzegorz Błaszczyk <[email protected]> 2014-2015
# License: MIT http://rem.mit-license.org/
MPLAYER=`which mplayer`
LAME=`which lame`
RM=`which rm`
@grzegorzblaszczyk
grzegorzblaszczyk / create_swapfile.sh
Last active August 5, 2024 11:07
Quick gist that recreates a swap file with 2048M swap
#!/bin/bash
SWAP_FILE="/swap"
sudo swapoff ${SWAP_FILE}
sudo dd if=/dev/zero of=${SWAP_FILE} bs=1M count=2048 && sudo mkswap ${SWAP_FILE} && sudo chmod 0600 ${SWAP_FILE} && sudo swapon ${SWAP_FILE}
@grzegorzblaszczyk
grzegorzblaszczyk / .gitignore
Last active May 10, 2019 18:43
Delete all but last worksheet in Google Docs Spreadsheet using Google Spreadsheet API
list_of_sheets.xml
nodes.txt
@grzegorzblaszczyk
grzegorzblaszczyk / spree_db_reset_auto_accept.sh
Last active December 26, 2015 06:19
Spree rake db:reset with 'auto accept' mode
AUTO_ACCEPT=true rake db:reset --trace
@grzegorzblaszczyk
grzegorzblaszczyk / comp_temp.sh
Created September 1, 2011 07:24
Check laptop temperature
#!/bin/bash
function print_usage {
echo "Usage: $0 [delay time in seconds]"
}
SLEEP_TIME=2
if [ "x$1" != "x" ]; then
if [[ $1 == "-h" || $1 == "--help" ]]; then
print_usage;
#!/bin/bash
################################################################################
# Subversion daily report generator 1.0 #
# fast & dirty version by Grzegorz Blaszczyk <[email protected]> #
################################################################################
AFTER_HOURS=17
CAT=`which cat`
@grzegorzblaszczyk
grzegorzblaszczyk / rtail.py
Created April 6, 2010 19:37 — forked from messa/rtail.py
RTail
#!/usr/bin/env python
"""
Usage:
./rtail.py user@host:port:path/foo.log bar.log host2:port:/path/baz.log
"""
import optparse
import os