Skip to content

Instantly share code, notes, and snippets.

Avatar

R Gibim Drowze

  • Fusioneer Software
  • Dublin, Ireland
  • Twitter @r_gibim
View GitHub Profile
@Drowze
Drowze / update-master.fish
Last active Jul 30, 2018
update-master.fish
View update-master.fish
function update-master --description "update master branch"
set __CUR_BRANCH (git rev-parse --abbrev-ref HEAD)
git checkout master
git pull
git checkout $__CUR_BRANCH
set -e __CUR_BRANCH
end
View cur-branch.fish
function cur_branch --description "Returns the name of the current git branch"
git rev-parse --abbrev-ref HEAD
end
@Drowze
Drowze / boxstarter.ps1
Last active May 25, 2018 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
View boxstarter.ps1
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@Drowze
Drowze / Removing audio tracks from mkv.md
Last active Mar 28, 2018
#mkv #mkvmerge Remove audio/subtitle from a batch of mkv files
View Removing audio tracks from mkv.md

Get the ids of the tracks with mkvinfo <file name> e.g.:

video 0
audio_disliked 1 (default)
audio_liked 2
subtitles_disliked 3 (default)
subtitles_liked 4
@Drowze
Drowze / rename_sakura.js
Created Mar 28, 2018
#rename #javascript script to remove CRC code from filenames
View rename_sakura.js
var fs = require('fs')
path = '../Cardcaptor Sakura TV series A-S/'
fs.readdir(path, function(err,files) {
if(err) throw err;
files.forEach(function(file, index) {
replaced_file = file.replace(/\[........\]/, '');
fs.rename(path + file, path + replaced_file, function(err) {
if(err) throw err;
@Drowze
Drowze / main.rb
Last active Oct 5, 2017
run with "ruby main.rb GAME_ID" and build a simple webpage with all the not-obtained steam achievements for a game, ordered from the most popular to the less popular
View main.rb
require 'ostruct'
require 'erb'
STEAM_PROFILE_ID = 'YOUR_STEAM_PROFILE_ID' # https://steamid.io/
STEAM_API_KEY = 'YOUR_API_KEY' # http://steamcommunity.com/dev/apikey (enter '127.0.0.1' if you're unsure about your domain name)
OUTPUT_HTML = 'steam_achievements.html'
INPUT_ERB = 'steam_achievements.html.erb'
module Steam
View gist:12e5936efb95356106d1cee58d6efd34
For an app I'm building for myself, I have to provide a privacy policy for
data retrieved from the API.
I will not release any data from the Uber API without explicit and clear
consent of the user.
This does not affect the user's statutory rights. The user is able to stop
using the service at any time, and can remove any data from the service
using the appropriate database management commands.
View grafo.txt
1 0
2 0
3 0
4 3
5 4
6 5
7 5
8 7
9 8
10 9
@Drowze
Drowze / index.php
Last active Jun 6, 2017
woodbine gallery
View index.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Ohana means family</title>
<!-- Bootstrap -->
@Drowze
Drowze / git.rake
Last active Jun 3, 2017
Rake task to create git tag with timestamp and all the merge events since last tag
View git.rake
namespace :git do
desc 'Create a tag with release name and merge events since last tag'
# expects merge events with no-ff, as gitlab does by default
APP_NAME = ''
MERGE_EVENTS_SINCE_LAST_TAG =
`git log \`git describe --tags --abbrev=0\`..HEAD --merges --oneline`
def release_name