Skip to content

Instantly share code, notes, and snippets.

View olleolleolle's full-sized avatar
🙌
In sunny Malmö in Sweden 🌞

Olle Jonsson olleolleolle

🙌
In sunny Malmö in Sweden 🌞
View GitHub Profile
@olleolleolle
olleolleolle / rename-on-s3.rb
Last active August 29, 2015 14:04
Improved by adding another S3 DEFAULT_HOST, putting the keys on the command-line.
# This is a quick script for doing a mass rename of all files in an
# Amazon S3 bucket.
# In this case, the rename operation was to unescape all filenames which
# had been previously escaped in error.
#############################
# Configuration:
bucketname = ENV.fetch('S3_BUCKET_NAME')
access_key = ENV.fetch('S3_ACCESS_KEY_ID')
@olleolleolle
olleolleolle / pre-commit.bat
Created June 11, 2010 07:40 — forked from jesperronn/pre-commit.bat
[useful] Subversion pre-commit hook for Windows machine
REM Subversion pre-commit hook for Windows machine
REM put this in your SVN repository folder /hooks/pre-commit.bat
REM we use it with svn version
REM http://stackoverflow.com/questions/869248/windows-pre-commit-hook-for-comment-length-subversion
@echo off
:: Stops commits that have empty log messages.
@echo off
setlocal
@olleolleolle
olleolleolle / serial_writer.py
Created March 23, 2010 20:31 — forked from qzio/serial_writer.py
Message writer for a... cool thing
#!/usr/bin/env python
import serial
import struct
from optparse import OptionParser
parser = OptionParser(usage="hurra")
parser.add_option("-p",default="hello world")
@olleolleolle
olleolleolle / es5array.js
Created February 23, 2010 14:17
adds ECMA-262 methods to Array prototype
/**
* Adds ECMA-262 rev. 5 methods to Array prototype, if they are missing
* Please note that the global prototypes are updated, so only use this file
* if that is acceptable, or if you're running in an iframe
*
* Please not that this file WILL NOT BE COPYRIGHTED, as it merely wraps mozilla implementation
* of JavaScript 1.6 / ECMA-262 rev. 5 methods
*
* @author Morgan Roderick - morgan@roderick.dk
*/