This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$workon_home_env__var_name = "WORKON_HOME" | |
$venv_file_name = ".venv" | |
$workon_home = $null | |
# Test if env-var exists | |
if(!(Test-Path Env:\$workon_home_env__var_name)) { | |
$Host.UI.WriteErrorLine("You must set the environment variable '" + $workon_home_env__var_name + "'. It must point to your virtual environment folder.") | |
Exit | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal | |
REM Generic .bat file to launch .ps1 files. | |
REM Name the .bat file like the .ps1 file and you are done. | |
set this_file_no_extension=%~n0 | |
set ps1_file=%this_file_no_extension%.ps1 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding=utf-8 | |
import json | |
__author__ = 'Jonas Gröger <jonas.groeger@gmail.com>' | |
def jsonify(cls): | |
def to_json(obj, **kargs): | |
return json.dumps(obj, default=lambda o: o.__dict__, **kargs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------------------------------------------------------------ | |
# Script: Clean-Temporary-Files.ps1 | |
# Author: Jonas Gröger <jonas.groeger@gmail.com> | |
# Date: 12.04.2014 | |
# Keywords: LaTeX, Clean, Delete, Remove, Temporary, Files | |
# Comments: Removes temporary files created by LaTeX etc. You can tweak it by | |
# adding extensions or specific files. | |
# ------------------------------------------------------------------------------ | |
Param( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass%% | |
%--------------------------------------------------------------------------- | |
[fontsize=12pt,%% Schriftgroesse | |
%--------------------------------------------------------------------------- | |
% Satzspiegel | |
paper=a4,%% Papierformat | |
enlargefirstpage=on,%% Erste Seite anders | |
pagenumber=headright,%% Seitenzahl oben mittig | |
%--------------------------------------------------------------------------- | |
% Layout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Defines transfer alias and provides easy command line file and folder sharing. | |
# | |
# Authors: | |
# Remco Verhoef <remco@dutchcoders.io> | |
# Jonas Gröger <jonas.groeger@gmail.com> | |
# | |
if (( ! $+commands[curl] )); then | |
return 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void logObjectAsJSON(String tag, Object o) { | |
// In order for this to work you need the XStream library located at http://xstream.codehaus.org/ | |
XStream x = new XStream(new Sun14ReflectionProvider(new FieldDictionary(new ImmutableFieldKeySorter())), new JsonHierarchicalStreamDriver()); | |
Log.d(tag, x.toXML(o)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// We are going to post to this url. | |
HttpPost post = new HttpPost("http://example.com/login"); | |
// We are going to use the apache httpclient | |
HttpClient client = new DefaultHttpClient(); | |
// The request is going to have some parameters. | |
final HttpParams params = new BasicHttpParams(); | |
// Set the redirecting parameter in params to false. This will make sure we dont follow redirects like 302 and the result we get from the server later is the actual one and not some follow up resource. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use in.pdf, extract pages 1-5, 10-19 and 26-end and output in out.pdf | |
pdftk in.pdf cat 1-5 10-19 26-end output out.pdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Cantor ( | |
c, | |
cx, | |
cy, | |
d, | |
h, | |
c_umkehr, | |
findmax) | |
where |
OlderNewer