Skip to content

Instantly share code, notes, and snippets.

View gpolitis's full-sized avatar
👾

George Politis gpolitis

👾
View GitHub Profile
@gpolitis
gpolitis / export-orgmode.pl
Created April 20, 2013 12:05
modified version of the export-html.pl (found in the /scripts/add-ons/ directory), that exports tasks to org-mode format that works for me
#! /usr/bin/perl
################################################################################
## taskwarrior - a command line task list manager.
##
## Copyright 2006-2013, Paul Beckingham, Federico Hernandez.
##
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software and associated documentation files (the "Software"), to deal
## in the Software without restriction, including without limitation the rights
## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@gpolitis
gpolitis / SciTEUser.properties
Created December 29, 2012 17:09
SciTE config
edge.mode=1
edge.column=80
font.base=$(font.monospace)
font.small=$(font.monospace)
font.comment=$(font.monospace)
font.text=$(font.monospace)
font.text.comment=$(font.monospace)
font.embedded.base=$(font.monospace)
font.embedded.comment=$(font.monospace)
$cue = 'c:\Users\gp\example.cue'
$patt = '(?smi)TITLE\s"([^"]*)"(?:\n|\s)*PERFORMER\s*"([^"]*)"'
cat $cue -Raw |
sls -patt $patt -AllMatches |
% { $_.Matches } |
% { New-Object -Property @{ Title = $_.Groups[1].Value; Artist = $_.Groups[2].Value } } |
% { "\track {0} - {1}" -f $_.Artist, $_.Title }
@gpolitis
gpolitis / gist:4351971
Created December 21, 2012 10:21
URL testing recipe in PowerShell
$regex = 'some regex goes here'
sls .\*.* -patt $regex -All | % { $_.Matches } | ? { $_.Success } | % { $_.Groups[2].Value }
sls .\*.* -patt $regex -All | % { $_.Matches } | ? { $_.Success } | % { Invoke-WebRequest $_.Groups[2].Value } | % { $_.StatusCode }
function emacs
{
&"C:\Program Files (x86)\emacs-24.2\bin\emacs.exe" "-nw" $args
}
function Get-BitsFile
{
Get-BitsTransfer | % {
$_.FileList | % {
New-Object PSObject -Property @{
@gpolitis
gpolitis / cheatsheet.tex
Last active October 13, 2015 18:58
TeX template for nice looking cheat sheets
\documentclass[10pt,a4paper]{article}
\usepackage{fontspec, polyglossia}
\usepackage{amsmath, amssymb, amsthm}
\usepackage{multicol}
\usepackage[margin=.3in]{geometry}
\usepackage[normalem]{ulem}
\setmainlanguage{french}
\setotherlanguages{english, greek}
@gpolitis
gpolitis / init.el
Created December 8, 2012 18:02
Emacs Init File
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(TeX-PDF-mode t)
'(TeX-engine (quote xetex))
'(calendar-holidays nil)
'(column-number-mode t)
'(epg-gpg-program "C:/Program Files (x86)/GNU/GnuPG/gpg2.exe")
@gpolitis
gpolitis / polyglot-xetex-template.tex
Created December 3, 2012 22:34
XeTeX with polyglossia template (for greek, french and english)
\documentclass{article}
\usepackage{fontspec, polyglossia}
\setmainlanguage{french}
\setotherlanguages{english, greek}
\newfontfamily\greekfont{Times New Roman}
\begin{document}
@gpolitis
gpolitis / DummyRunnable.java
Created April 3, 2012 18:23
Renaming algorithm implementation
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
class DummyRunnable implements Runnable {
public static void main(String[] args) {
init();
start();
@gpolitis
gpolitis / build.xml
Created February 29, 2012 15:26
Ant sample build.xml
<?xml version="1.0"?>
<project name="the project" default="compile" basedir=".">
<property name="src.dir" location="src" />
<property name="bin.dir" location="bin" />
<property name="lib.dir" location="lib" />
<path id="classpath">
<fileset dir="${lib.dir}" includes="**/*.jar" />
</path>