Skip to content

Instantly share code, notes, and snippets.

@torokmark
torokmark / .gitconfig
Created September 21, 2014 19:25
.gitconfig
[user]
name =
email =
[push]
default = matching
[color]
ui = auto
[color "branch"]
current = yellow bold
#!/usr/bin/env bash
test_import_http_func() {
echo "test_import_http_func is called";
}
$ docker --help
$ docker run --help
$ docker-machine ls
$ docker-machine start default
$ docker-machine rm default
$ docker-machine create default --driver virtualbox
$ eval $("C:\Program Files\Docker Toolbox\docker-machine.exe" env default)
@torokmark
torokmark / jenkins-commands.txt
Created April 7, 2017 20:49
Jeninks 2.32.1 CLI Commands
add-job-to-view
Adds jobs to view.
build
Builds a job, and optionally waits until its completion.
cancel-quiet-down
Cancel the effect of the "quiet-down" command.
clear-queue
Clears the build queue.
connect-node
Reconnect to a node(s)
@torokmark
torokmark / remove_recurring_all_day_events_from_google_calendar.js
Created May 1, 2017 16:32
remove recurring all day events from google calendar
function main() {
getEventSeries();
}
function getEventSeries() {
var calendar = CalendarApp.getCalendarById("email-address");
for (var month = 0; month < 13; month += 1) {
var date = new Date(2012, month, 1);
var eventsOnDay = calendar.getEvents(new Date(2012, date.getMonth() , 1), new Date(2012, date.getMonth() + 1, 0));
for (var ej = 0; ej < eventsOnDay.length; ej += 1) {
#!/usr/bin/env bash
sudo apt install python -y
yes '' | sudo apt-add-repository ppa:ansible/ansible
sudo apt update
sudo apt install ansible -y
sudo apt install git -y
@torokmark
torokmark / LinkedMap.java
Last active December 15, 2019 07:59
Interview: Implement a HashMap-like datastruct without using any types from Collection API. Make sure it is flexibly extensible.
class LinkedMap<Key, Value> {
private class Node<Key, Value> {
private Key key;
private Value value;
private Node<Key, Value> next;
public Node(Key key, Value value, Node<Key, Value> next) {
this.key = key;
this.value = value;
this.next = next;