Skip to content

Instantly share code, notes, and snippets.

Adrian Juszczak Juszczak

Block or report user

Report or block Juszczak

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@fane89
fane89 / .bash_profile
Last active Mar 14, 2019
.bash_profile
View .bash_profile
export VISUAL=vim
export EDITOR="$VISUAL"
export HISTCONTROL=ignoredups:erasedups
export HISTSIZE=10000
export PROMPT_COMMAND='history -a; history -r;echo -ne "\033]0;${PWD##*/}\007"'
green=$(tput setaf 2)
reset=$(tput sgr0)
PS1="\w \[$green\]$\[$reset\] "
stty -ixon
@coopermaruyama
coopermaruyama / on-web3.js
Last active Aug 23, 2018
Check if web3 is ready
View on-web3.js
/**
* Usage: ```
* import waitForWeb3 from './on-web3.js'; // code in this gist
* waitForWeb3.then(() => runYourApp() );
* ```
* When web3 is provided by metamask, the accounts may not be available right
* away. So, if you need the accounts to be available (like for a route that
* requires a 'user'), the example that they give in their docs won't work.
*
* This function takes a callback that will be called when the accounts are
@csswizardry
csswizardry / README.md
Last active Feb 22, 2020
Vim without NERD tree or CtrlP
View README.md

Vim without NERD tree or CtrlP

I used to use NERD tree for quite a while, then switched to CtrlP for something a little more lightweight. My setup now includes zero file browser or tree view, and instead uses native Vim fuzzy search and auto-directory switching.

Fuzzy Search

There is a super sweet feature in Vim whereby you can fuzzy find your files using **/*, e.g.:

:vs **/*<partial file name><Tab>
@enzinier
enzinier / install_font_adobe_source_code_pro.sh
Created Mar 4, 2017
Install font Adobe Source Code Pro on Ubuntu 16.04 LTS
View install_font_adobe_source_code_pro.sh
#!/bin/sh
# Userland mode (~$USER/), (~/).
# ~/.fonts is now deprecated and that
#FONT_HOME=~/.fonts
# ~/.local/share/fonts should be used instead
FONT_HOME=~/.local/share/fonts
echo "installing fonts at $PWD to $FONT_HOME"
mkdir -p "$FONT_HOME/adobe-fonts/source-code-pro"
@subfuzion
subfuzion / curl.md
Last active Feb 25, 2020
curl POST examples
View curl.md

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.

@staltz
staltz / introrx.md
Last active Feb 25, 2020
The introduction to Reactive Programming you've been missing
View introrx.md
@sergejmueller
sergejmueller / ttf2woff2.md
Last active Feb 18, 2020
WOFF 2.0 – Learn more about the next generation Web Font Format and convert TTF to WOFF2
View ttf2woff2.md
@lttlrck
lttlrck / gist:9628955
Created Mar 18, 2014
rename git branch locally and remotely
View gist:9628955
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
@marekhrabe
marekhrabe / animatedScrollTo.js
Created Mar 9, 2014
Animated scrolling without any dependency on libraries. If user scrolls when animation is running, scroll animation would be immediately canceled.
View animatedScrollTo.js
window.requestAnimFrame = (function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(callback){window.setTimeout(callback,1000/60);};})();
var easeInOutQuad = function (t, b, c, d) {
t /= d/2;
if (t < 1) return c/2*t*t + b;
t--;
return -c/2 * (t*(t-2) - 1) + b;
};
var animatedScrollTo = function (element, to, duration) {
@XVilka
XVilka / TrueColour.md
Last active Feb 25, 2020
True Colour (16 million colours) support in various terminal applications and terminals
View TrueColour.md

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)
You can’t perform that action at this time.