Skip to content

Instantly share code, notes, and snippets.

View rib1's full-sized avatar

Sampo Kytömäki rib1

  • CGI, Logica
  • Helsinki, Finland
View GitHub Profile
@rib1
rib1 / Vagrantfile
Created November 2, 2018 08:53 — forked from lucasjellema/Vagrantfile
Vagrantfile for creating and running an Ubuntu VM with large disk, preconfigured IP address, provisioned Docker and Docker Compose
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
gource --hide dirnames,filenames,mouse,usernames --seconds-per-day .07000 --file-idle-time 0 -o temporary.ppm --start-date '2016-01-01'
ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i temporary.ppm -vcodec libx264 -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 -preset slow finalVideo.mp4
@rib1
rib1 / hyper-v.ps1
Created March 14, 2018 12:16
Enable/Disable Microsoft-Hyper-V
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All

Keybase proof

I hereby claim:

  • I am rib1 on github.
  • I am sampo (https://keybase.io/sampo) on keybase.
  • I have a public key ASBPyGG2pyUgu0BcZBSJFnS-BBVqS_0tZcf6T0KQuUGBeQo

To claim this, I am signing this object:

@rib1
rib1 / backup_table.sql
Last active February 20, 2017 14:10
Make copy of table
CREATE TABLE table1_backup LIKE table1
insert into table1_backup (select * from table1)
@rib1
rib1 / svn2git.sh
Last active March 21, 2016 11:03
svn to git conversion
#svn authors to file
svn log -q | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > authors-transform.txt
git svn clone --username xxx
svn://0.0.0.0/xx/svnroot/xx/
--authors-file=authors-transform.txt --no-metadata -s destdir
#convert tags
git for-each-ref --format='%(refname)' refs/remotes/origin/tags | cut -d / -f 5|
while read ref
@rib1
rib1 / git_move.sh
Last active February 20, 2017 14:15
moves a folder from one git repo into another repo with history intact
#!/usr/bin/env bash
repo=$1
folder=$2
dest_repo=$3
dest_folder=$4
clone_folder='__git_clone_repo__'
display_usage() {
echo -e "Usage:\n$0 sourcerepodir project/src/test/java/org/source/directory /c/Users/user/destrepodir project/src/test/java/org/dest/directory"
@rib1
rib1 / fixWindowsZipUmlauts.sh
Last active July 12, 2018 18:05
Fix Windows zip umlauts for Linux/Unix
#!/bin/bash
SRCZIP=$1
TMPDIR=$2
unzipver=`unzip|grep "UnZip 6.00 of 20 April 2009"`
if [ $? -ne 0 ]
then
echo "UnZip not found or unknown version!"
exit 1
@rib1
rib1 / gist:4466260
Last active December 10, 2015 17:18
Set jpeg timestamp from exif data
find . -name '*.jpg' |
while read f; do
touch -t `
exiv2 "${f}" |
grep timestamp |
awk '{split($5,t,":");print $4,t[1],t[2],".",t[3]}' |
sed 's/[:, ]//g'` "${f}";
done
@rib1
rib1 / rm_dupl_open_with.sh
Last active December 10, 2015 07:38 — forked from anonymous/gist:4402355
How to Clean Up Your Mac’s “Open With” Contextual Menu (remove duplicates)
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user