Skip to content

Instantly share code, notes, and snippets.

View AmirHossein's full-sized avatar
🦸‍♂️
Back to the game!

Amir Hossein AmirHossein

🦸‍♂️
Back to the game!
View GitHub Profile
@subfuzion
subfuzion / curl.md
Last active September 20, 2024 18:43
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@kenglxn
kenglxn / jhome.fish
Last active May 10, 2022 13:30
If you have more javas and you want to switch between the javas, you can select a java from the javas with this...
function jhome
set -x JAVA_HOME (/usr/libexec/java_home $argv)
echo "JAVA_HOME:" $JAVA_HOME
echo "java -version:"
java -version
end
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@DemkaAge
DemkaAge / UTF8Control.java
Last active June 4, 2020 10:36
ResourceBundle UTF-8 Control class
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.Locale;
import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;