Skip to content

Instantly share code, notes, and snippets.

Hasan Kara haisi

View GitHub Profile
haisi /
Last active Nov 27, 2018
# start a jupyter notebook from any folder
jupyter notebook .
# start a minimal react-app
npm install -g create-react-app
create-react-app react-hello-world
# um alles zusammen zu fassen (module in ein File)
rollup app.js -f esm > file.js
View selenium-tester.js
var webdriver = require('selenium-webdriver');
var keyword = "Magic";
var driver = new webdriver.Builder().
haisi / .gitconfig
Last active Dec 22, 2016
Git Aliases
View .gitconfig
autocrlf = true
excludesfile = ~/.gitignore
unstage = reset -q HEAD --
discard = checkout --
nevermind = !git reset --hard HEAD && git clean -d -f
uncommit = reset --mixed HEAD~
save = commit -m
resave = commit --amend
import org.springframework.beans.factory.InjectionPoint;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.config.DependencyDescriptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;
import org.springframework.web.context.annotation.SessionScope;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
View downloadAndSaveWebsite.groovy
def content = "".toURL().text
writeToFile("C:/tmp", "fhnw-job-ausschreibung", "html", content)
public void writeToFile(String directory, String fileName, String extension, def content) {
new File("$directory/$fileName.$extension").withWriter { out ->
out.println content
haisi / countEachChar.groovy
Created Jun 30, 2016
Groovy-Script to count each character in passed file and prints them in ascending order
View countEachChar.groovy
#! /usr/bin/env
// Example
// groovy countEachChar.groovy MY_TEXTFILE > OUT_PUT_TEXT_FILE
def printErr = System.err.&println
if (args.length == 0) {
printErr "No path is passed as an argument! Exiting!"
haisi / EditableTable
Created Nov 7, 2014
Editable JavaFX TableView with textfield, datepicker and dropdown menue
View EditableTable
* I don't care
package editabletableview;
import java.time.LocalDate;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.time.format.FormatStyle;
import java.util.Date;
You can’t perform that action at this time.