Skip to content

Instantly share code, notes, and snippets.

View tadelv's full-sized avatar
💭
🦙

Vid Tadel tadelv

💭
🦙
View GitHub Profile

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@tadelv
tadelv / urlsafari
Created November 2, 2019 01:33 — forked from kshiteesh/urlsafari
This AppleScript saves all the tabs open in all Safari windows to a Markdown file.
(*
Export All Safari Tabs in All Open Windows to a Markdown File
July 13, 2015
// SCRIPT PAGE
http://hegde.me/urlsafari
// ORIGINAL SCRIPT ON WHICH THIS SCRIPT IS BUILT
http://veritrope.com/code/export-all-safari-tabs-to-a-text-file
@tadelv
tadelv / perfectelementary.bash
Created December 23, 2015 10:46
HowTo Install the perfect Elementary-OS
#Download Elementary OS from here:
#http://sourceforge.net/projects/elementaryos/files/stable/
#First you update your system
sudo apt-get update && sudo apt-get dist-upgrade
#Install Google Chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
@tadelv
tadelv / slo_gas_price_scraper.rb
Created January 11, 2011 14:30
plz don't kill me, i don't know how to write code
require 'rubygems'
require 'open-uri'
require "hpricot"
html = open('http://www.amzs.si/?podrocje=18').read
doc = Hpricot(html)
count_ary = (doc/"td.DefaultTemplate/table/tr").to_ary
countries = count_ary[3..41]
@tadelv
tadelv / multipleARCH.sh
Created December 20, 2010 20:53
script for building multiple arch builds at once
# Purpose:
# Create a static library for iPhone from within XCode
# Because Apple staff DELIBERATELY broke Xcode to make this impossible from the GUI (Xcode 3.2.3 specifically states this in the Release notes!)
# ...no, I don't understand why they did such a stupid thing either!
#
# Author: Adam Martin - http://twitter.com/redglassesapps
# Based on: original script from Eonil (main changes: Eonil's script WILL NOT WORK in Xcode GUI - it WILL CRASH YOUR COMPUTER)
#
# More info: see this Stack Overflow question: http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4
@tadelv
tadelv / Debug.h
Created August 13, 2010 12:59
Awesome debug
//Debug.h
#import <Foundation/Foundation.h>
#ifdef DEBUG
#define DebugLog( xx, ...) _DebugLog(@"%s(%d): " xx, __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
#else
#define DebugLog( s, ... ) ((void)0)
#endif
@tadelv
tadelv / iOS4Check.h
Created July 21, 2010 09:35
Macro for conditional code compilation depending on OS versions in iOS
//
// iOS4Check.h
//
// Thank you:
// http://cocoawithlove.com/2010/07/tips-tricks-for-conditional-ios3-ios32.html
//
// Created by Vid Tadel on 7/9/10.
//
#import <UIKit/UIKit.h>
@tadelv
tadelv / dSYM_to_storage.sh
Created July 19, 2010 11:54
Store dSYM files in a folder and add to git
#!/bin/sh
#
# http://www.cimgf.com/2009/12/23/automatically-save-the-dsym-files/
#
if [ "$BUILD_STYLE" == "Debug" ]; then
echo "Skipping debug"
exit 0;
fi
@tadelv
tadelv / Debug.h
Created July 15, 2010 07:24
a verbose NSLog
#import <Foundation/Foundation.h>
#ifdef DEBUG
#define DebugLog( xx, ...) NSLog(@"%s(%d): " xx, __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
#else
#define DebugLog( s, ... ) ((void)0)
#endif
#podaj vektor atributov, katere
#funkcija odstrani iz dataseta in izracuna napovedi
#atributi so podani z indeksom (da jih lazje odstranimo)
odstrani.atr.in.izr.napovedi <- function(dataset, attributes, model, formula, ...) {
cat("OHAI!1!\n")
results <- ""
predictions <- ""
for(i in 1:length(attributes)) {
pr <- izracunaj.napovedi(formula, model, dataset[,-attributes[i]],...)
#predictions <- c(predictions,pr)