Skip to content

Instantly share code, notes, and snippets.

@tpai
tpai / instructions.md
Last active May 23, 2022
use both Tor and Privoxy with Mac OSX
View instructions.md

1. install

brew install tor
brew install privoxy

2. copy and modify config file

@0xjac
0xjac / private_fork.md
Last active May 23, 2022
Create a private fork of a public repository
View private_fork.md

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@jexchan
jexchan / multiple_ssh_setting.md
Created Apr 10, 2012
Multiple SSH keys for different github accounts
View multiple_ssh_setting.md

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@pdunnavant
pdunnavant / increment-pom-versions.sh
Last active May 20, 2022
Script that uses the versions-maven-plugin to automatically increment the build number in the version of a project. This is intended to be used in a continuous delivery environment.
View increment-pom-versions.sh
#!/bin/bash
#################################################################################
# WARNING: DO NOT JUST RUN THIS SCRIPT BLINDLY. MAKE SURE YOU UNDERSTAND WHAT IT
# IS DOING. IT *WILL* TRY TO COMMIT CHANGES. IT WILL ALSO TRY TO EAT YOUR
# CHILDREN. IT MAY CAUSE THE SUN TO GO SUPERNOVA. I CLAIM NO RESPONSIBILITY FOR
# WHATEVER HAPPENS AFTER YOU RUN THIS. NOW, CARRY ON. :-)
#
# This script, run from the root of a Maven single or multi-module project, will
# update the pom files to increment the build number on the version.
@daredude
daredude / docker-clear.bat
Created Jun 5, 2016
delete all docker container and images on windows
View docker-clear.bat
@echo off
FOR /f "tokens=*" %%i IN ('docker ps -aq') DO docker rm %%i
FOR /f "tokens=*" %%i IN ('docker images --format "{{.ID}}"') DO docker rmi %%i
@onjin
onjin / docker-compose.yml
Created Sep 5, 2016
example docker compose for postgresql with db init script
View docker-compose.yml
postgres:
image: postgres:9.4
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
@P7h
P7h / IntelliJ_IDEA__Perf_Tuning.txt
Last active Apr 3, 2022
Performance tuning parameters for IntelliJ IDEA. Add these params in idea64.exe.vmoptions or idea.exe.vmoptions file in IntelliJ IDEA. If you are using JDK 8.x, please knock off PermSize and MaxPermSize parameters from the tuning configuration.
View IntelliJ_IDEA__Perf_Tuning.txt
-server
-Xms2048m
-Xmx2048m
-XX:NewSize=512m
-XX:MaxNewSize=512m
-XX:PermSize=512m
-XX:MaxPermSize=512m
-XX:+UseParNewGC
-XX:ParallelGCThreads=4
-XX:MaxTenuringThreshold=1
@aelkz
aelkz / [FEDORA] gitkraken
Last active Apr 1, 2022
How to install gitkraken on Fedora [25,26,27] + launcher icon
View [FEDORA] gitkraken
#!/bin/bash
# Download GitKraken
wget https://release.gitkraken.com/linux/gitkraken-amd64.tar.gz
# copy the downloaded file into /opt directory
cp gitkraken-amd64.tar.gz /opt/
cd /opt
View Sublime Text 3 cheating.md

Ref: https://gist.github.com/vertexclique/9839383

Important Note

Please use built-in Terminal.app (of Mac OS X) to type and rune the command, do not use another tool (like iTerm2).

Common step after enter run the patch command:

  • After run the commands, start new Sublime Text app, go to Main Menu > Help > Enter License. On the popup type in any text (example "a") and click Use Licence .
@kenjipm
kenjipm / workers.sql
Last active Nov 23, 2021
The following data definition defines an organization's employee hierarchy. An employee is a manager if any other employee has their managerId set to the first employees id. An employee who is a manager may or may not also have a manager. TABLE employees id INTEGER NOT NULL PRIMARY KEY managerId INTEGER REFERENCES employees(id) name VARCHAR(30) …
View workers.sql
SELECT name FROM employees
WHERE id NOT IN (SELECT managerId FROM employees WHERE managerId IS NOT NULL);