Skip to content

Instantly share code, notes, and snippets.

View froulet's full-sized avatar

Frantz Roulet froulet

View GitHub Profile
@liuyanghejerry
liuyanghejerry / index.html
Last active April 2, 2024 20:16
Modern index file in 2017
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">
<head>
<!-- content-type, which overrides http equivalent header. Because of charset, this meta should be set at first. -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- Overrides http equivalent header. This tells IE to use the most updated engine. -->
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<!-- Tells crawlers how to crawl this page, and the role of this page. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta -->
<meta name="robots" content="index, follow">
@dersam
dersam / gitkraken.zsh
Last active May 28, 2024 22:14
Open GitKraken using the current repo directory in the cli.
## Open GitKraken using the current repo directory.
## For when you want a prettier view of your current repo,
## but prefer staying in the cli for most things.
## This will break if GitKraken ever removes the -p flag.
## If you're not using OSX, the path is definitely different.
kraken () {
~/Applications/GitKraken.app/Contents/MacOS/GitKraken -p $(pwd)
}
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@vlymar
vlymar / fzf_dope.sh
Created March 28, 2016 17:12
git fzf multi-add modified files
# fuzzy multi-select modified file
gfmod() {
git ls-files -m | fzf -m
}
# stage files multi-selected modified files
gfadd() {
git add $(gfmod)
}
@wtfaremyinitials
wtfaremyinitials / ByteOutputStream.java
Created March 15, 2016 16:26
Easily write one bit at a time in Java
import java.io.*;
public class ByteOutputStream extends FileOutputStream {
byte buffer;
byte pos;
public ByteOutputStream(File file) throws FileNotFoundException {
super(file);
buffer = 0x00;
@reggi
reggi / glob-up-and-running.md
Last active March 16, 2022 16:47
A tutorial on how to get started using glob patterns in your terminal. #writing

Glob Up and Running

To test a glob pattern go over to globtester and play around with creating your own file structure online, it's super easy to get started that way.

If you want to test out a glob pattern in the terminal use echo followed by the pattern, for instance.

echo **/*.js
@arthurleon
arthurleon / unique-val-col-calc
Created June 25, 2015 14:44
Get unique values of a column in Libre Office Calc
Select the whole column
Data > Filter > Standard Filter
Change 'Field Name' to -none- , click on 'More options' and check on 'No duplication' box
Source: http://superuser.com/questions/238656/openoffice-get-distinct-values-from-column
@jjarava
jjarava / Chrome-DevTools-Net-Export-All-Session-2015-02-12_17-56-56.jpg
Last active April 19, 2024 16:50
How to *record* web Sessions for later analysis
Chrome-DevTools-Net-Export-All-Session-2015-02-12_17-56-56.jpg
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@max-mapper
max-mapper / 0.md
Last active February 25, 2024 12:24
JS hoisting by example

JavaScript function hoisting by example

Below are many examples of function hoisting behavior in JavaScript. Ones marked as works successfuly print 'hi!' without errors.

To play around with these examples (recommended) clone them with git and execute them with e.g. node a.js

Notes on hoisting

(I may be using incorrect terms below, please forgive me)