Skip to content

Instantly share code, notes, and snippets.

62670,50689,74016,89663,88676,8656,45810,78903,42372,7450,84540,10203,11186,26242,60948,6001,88298,35259,47767,74702,35450,26739,6812,46776,4465,4675,80985,50761,9572,61561,20897,97997,43424,30642,96130,10658,84610,23353,56681,81749,7600,583,61054,73098,66965,6289,74894,45016,96813,76117,68417,38287,13721,16441,30943,49406,9086,3137,95059,80549,82789,58583,18462,17612,95763,35597,9785,17429,12329,55930,34757,38921,46069,78475,14699,22660,35329,80296,27841,65278,4009,63931,20550,36593,12633,15756,39716,71561,34398,66712,89399,68359,48733,86288,68348,56547,44245,36714,17300,51453,13046,74536,64640,99869,39634,26027,54955,91319,56093,31613,43743,95877,10211,29388,35657,92542,34894,30911,16768,2634,7793,80906,21041,32861,22284,16161,23619,17492,4383,34103,55668,62086,3355,71041,1188,10824,98761,78288,45260,18343,49499,73947,90254,6116,79622,74452,83698,19951,35025,254,4370,23516,53234,9351,71931,79291,7585,33119,86414,48453,5,73340,13457,61877,97556,79733,51457,97792,90955,32759,25492,61398,3111,18086,23019,86695
@tomkul
tomkul / AdbCommands
Created April 25, 2022 22:49 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@tomkul
tomkul / Jenkinsfile
Created November 26, 2020 14:18 — forked from merikan/Jenkinsfile
Some Jenkinsfile examples
Some Jenkinsfile examples
@tomkul
tomkul / css-selectors.md
Created October 22, 2020 18:10 — forked from magicznyleszek/css-selectors.md
CSS Selectors Cheatsheet

CSS Selectors Cheatsheet

Element selectors

Element -- selects all h2 elements on the page

h2 {
    foo: bar;
@tomkul
tomkul / 0.suffixtree.cs
Created January 27, 2020 10:41 — forked from axefrog/0.suffixtree.cs
C# Suffix tree implementation based on Ukkonen's algorithm. Full explanation here: http://stackoverflow.com/questions/9452701/ukkonens-suffix-tree-algorithm-in-plain-english
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace SuffixTreeAlgorithm
{
public class SuffixTree
{
@tomkul
tomkul / ScriptRunner.java
Created November 26, 2019 11:45 — forked from gustavohenrique/ScriptRunner.java
Run sql command from java
/*
* Slightly modified version of the com.ibatis.common.jdbc.ScriptRunner class
* from the iBATIS Apache project. Only removed dependency on Resource class
* and a constructor
*/
/*
* Copyright 2004 Clinton Begin
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@tomkul
tomkul / gremlin-cheat-sheet.md
Created October 8, 2019 07:53 — forked from jeremysears/gremlin-cheat-sheet.md
Gremlin Cheat Sheet in Groovy

Gremlin Cheat Sheet in Groovy

Gremin traversal examples taken from the excellent DS330: DataStax Enterprise Graph course.

Creating Vertices and Vertex Properties

Add a Vertex

Vertex u = graph.addVertex("user");
       u.property("userId","u2016");
 u.property("age",36);
@tomkul
tomkul / dse-graph-schema-cheat-sheet.md
Last active September 9, 2019 15:38 — forked from jeremysears/dse-graph-schema-cheat-sheet.md
DSE Graph Schema Management Cheat Sheet in Gremlin Groovy

DSE Graph Schema Management Cheat Sheet in Gremlin Groovy

DSE Graph schema management examples taken from the excellent DS330: DataStax Enterprise Graph course.

Graph Definition

List all graph names:

system.graphs();  // => KillrVideo

Describe all graphs:

@tomkul
tomkul / check-gzip.sh
Created August 7, 2019 10:24 — forked from timendum/check-gzip.sh
Check if gzip is enabled [ http bash curl ]
curl -I -H "Accept-Encoding: gzip,deflate" "$URL" --silent | grep -i "Content-Encoding:"
# OR
curl -H "Accept-Encoding: gzip,deflate" "$URL" --silent --write-out "%{size_download}" --output /dev/null
curl "$URL" --silent --write-out "%{size_download}" --output /dev/null
# 2nd must be greater the 1st
@tomkul
tomkul / README.md
Created August 6, 2019 20:23 — forked from ivan-loh/README.md
netcat tcp proxy, for mapping ports on a remote machine to a local machine

Helper script to map ports to other servers.

Use Case

had a database that was only accesible in the VPC on aws, so i created an dev intance and did a ssh tunnel to that dev instance with netcat mapping the port to the database

Sample Usage

Forward all request from local 5432 to remote host google.com port 80

./nc-proxy.sh 5432 google.com 80