Skip to content

Instantly share code, notes, and snippets.

@erikogan
erikogan / .zshenv
Last active March 4, 2021 05:00 — forked from bmhatfield/.zshrc
OSX Keychain Environment Variables
# I’ve made this fairly zsh-specific. If you’re using bash, you might look at the gist I forked from.
fpath=(~/bin/functions /usr/share/zsh/site-functions /usr/share/zsh/$ZSH_VERSION/functions)
autoload keychain_env_var_{get{,_conditional},set}
# AWS configuration example, after doing:
# $ keychain_env_var_set AWS_ACCESS_KEY_ID
# provide: "AKIAYOURACCESSKEY"
# $ keychain_env_var_set AWS_SECRET_ACCESS_KEY
# provide: "j1/yoursupersecret/password"
@jianwu
jianwu / mshell
Last active October 27, 2021 12:50
mshell: to run jshell for a maven project with all the dependancies injected.
# Run this script from the maven module directory to start a jshell with
# all dependent class paths injected.
# Please never run it on the parent maven project directory.
# It depends on java9 or above
if [ ! -d "target" ]; then
echo "Please run it under a module directory. And make sure it's not parent module directory. And make a maven install first"
exit
fi
{
"$schema": "https://vega.github.io/schema/vega/v3.0.json",
"data": [
{
"name": "data",
"values": {
"aggregations": {
"pairs": {
"buckets": [
{"key": "aa:cc", "doc_count": 10},
@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active May 6, 2024 13:53
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@jgraglia
jgraglia / Jenkinsfile
Created July 11, 2017 10:38
Extended Choice Plugin in Jenkins pipeline
// YOU HAVE TO :
// 1. install the Extended Choice Parameter Plugin : https://wiki.jenkins.io/display/JENKINS/Extended+Choice+Parameter+plugin
// 2. Allow the instanciation of ExtendedChoiceParameterDefinition in you script approval admin page https://myjenkins/scriptApproval/
List params = []
List props = []
// https://github.com/jenkinsci/extended-choice-parameter-plugin/blob/master/src/main/java/com/cwctravel/hudson/plugins/extended_choice_parameter/ExtendedChoiceParameterDefinition.java#L427
// https://issues.jenkins-ci.org/browse/JENKINS-34617
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active May 2, 2024 16:19
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@judy2k
judy2k / parse_dotenv.bash
Created March 22, 2017 13:34
Parse a .env (dotenv) file directly using BASH
# Pass the env-vars to MYCOMMAND
eval $(egrep -v '^#' .env | xargs) MYCOMMAND
# … or ...
# Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)
@DonRichards
DonRichards / vagrantFile.md
Last active December 29, 2022 13:33
Conditional Vagrant environments

Conditional Vagrant environments

2 options to start vagrant

command line with pass-through variable or alias

Run while passing variable to vagrantfile

$ ENV='local' vagrant up 

Add an alias

@dcode
dcode / GitHub Flavored Asciidoc (GFA).adoc
Last active April 20, 2024 13:55
Demo of some useful tips for using Asciidoc on GitHub

GitHub Flavored Asciidoc (GFA)

@baumandm
baumandm / GIF-Screencast-OSX.md
Last active November 3, 2023 07:18 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to Animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime and ffmpeg.

Forked from https://gist.github.com/dergachev/4627207. Updated to use a palette to improve quality and skip gifsicle.

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: