Skip to content

Instantly share code, notes, and snippets.

View onegrx's full-sized avatar

Bartłomiej Szałach onegrx

  • Kraków, Poland
View GitHub Profile
/usr/bin/python3.4 /home/onegrx/Desktop/db-gen/generator.py
AssignAttendee 1134, 559
AssignAttendee 1134, 562
AssignAttendee 1134, 577
AssignAttendee 1134, 614
AssignAttendee 1134, 645
AssignAttendee 1134, 658
AssignAttendee 1135, 612
AssignAttendee 1135, 627
AssignAttendee 1135, 628
@onegrx
onegrx / hello-latex.tex
Created March 9, 2016 14:36 — forked from wbzyl/hello-latex.tex
Szablon LateX-a dla ShareLaTeX
\documentclass[12pt,a4paper,polish]{article}
\usepackage{polski}
\usepackage[utf8]{inputenc}
\begin{document}
\section{Tytuł}
Uwaga na znaki specjalne!
class Plane {}
class Airbus extends Plane {}
public class Main {
void fly(Plane p) {
System.out.println("I'm in a plane");
}
void fly(Airbus a) {
System.out.println("I'm in the best Airbus!");
@onegrx
onegrx / preprocessor_fun.h
Created April 18, 2016 21:24 — forked from aras-p/preprocessor_fun.h
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@onegrx
onegrx / 0.md
Created May 16, 2016 01:43 — forked from max-mapper/0.md
JS hoisting by example

JavaScript function hoisting by example

Below are many examples of function hoisting behavior in JavaScript. Ones marked as works successfuly print 'hi!' without errors.

To play around with these examples (recommended) clone them with git and execute them with e.g. node a.js

Notes on hoisting

(I may be using incorrect terms below, please forgive me)

import org.jsoup.Jsoup
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import org.jsoup.select.Elements
import scala.collection.JavaConversions._
import java.net.{ URL, MalformedURLException }
import scala.util.control.Exception._
sealed case class Link(title: String, href: String)
body {
background-color: #333333;
text-align: center;
color: #33b5d3;
font-size: 22px;
font-family: 'Gloria Hallelujah', cursive;
}
p {
display: inline;
/usr/lib/jvm/java-8-oracle/bin/java -Didea.launcher.port=7534 -Didea.launcher.bin.path=/home/onegrx/apps/idea-IU-162.2228.15/bin -Dfile.encoding=UTF-8 -classpath /usr/lib/jvm/java-8-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-8-oracle/jre/lib/deploy.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/jaccess.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/jfxrt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/nashorn.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunec.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/zipfs.jar:/usr/lib/jvm/java-8-oracle/jre/lib/javaws.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfr.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfxswt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-8-oracle/jre
@onegrx
onegrx / neo4j.txt
Last active January 11, 2017 12:49
Neo4j examples
MATCH (movie:Movie)
WHERE movie.year = 2016
RETURN movie.title AS title
ORDER BY title ASC LIMIT 25
MATCH (m:Movie {title: "Star Wars"})<-[:DIRECTED]-(p:Person {})
RETURN p.name, m.title
MATCH (a:Person {name: "Emma Watson II"})-[:ACTED_IN]-(m)<-[:ACTED_IN]-(coActors)
RETURN coActors.name
#*****************************************************************
# Neo4j configuration
#
# For more details and a complete list of settings, please see
# https://neo4j.com/docs/operations-manual/current/reference/#configuration-settings
#*****************************************************************
# The name of the database to mount
dbms.active_database=default.graphdb