Skip to content

Instantly share code, notes, and snippets.

@remi
remi / .gitconfig
Created July 27, 2011 18:14
Alias pour utiliser git en français!
[alias]
etat = status
pousser = push
tirer = pull
commettre = commit
ranger = stash
ajouter = add
enlever = rm
cloner = clone
fusionner = merge
@jewelsea
jewelsea / FxExperienceSplash
Created January 10, 2012 11:19
JavaFX standalone application Splash Page for a great website.
package org.jewelsea.examples.splash;
import javafx.animation.FadeTransition;
import javafx.application.Application;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Pos;
import javafx.geometry.Rectangle2D;
@jboner
jboner / latency.txt
Last active July 17, 2024 03:12
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@n00neimp0rtant
n00neimp0rtant / gist:9515611
Last active March 14, 2024 06:30
simple squash without rebase
## within current branch, squashes all commits that are ahead of master down into one
## useful if you merged with upstream in the middle of your commits (rebase could get very ugly if this is the case)
## commit any working changes on branch "mybranchname", then...
git checkout master
git checkout -b mybranchname_temp
git merge --squash mybranchname
git commit -am "Message describing all squashed commits"
git branch -m mybranchname mybranchname_unsquashed
git branch -m mybranchname
@n8henrie
n8henrie / txt_to_reminders.applescript
Last active March 11, 2024 17:04
Demonstration of using AppleScript with Reminders.app
--taken from http://benguild.com/2012/04/11/how-to-import-tasks-to-do-items-into-ios-reminders/#comment-1346894559
--set theFileContents to (read file "Users:n8henrie:Desktop:Reminders.txt") -- Change this to the path to your downloaded text file with your tasks in it! (Note the : instead of a / between folders) Or, just name them Reminders.txt and put them in your downloads folder
--set theLines to paragraphs of theFileContents
set theLines to {"task name 1", "task name 2"}
repeat with eachLine in theLines
tell application "Reminders"
set mylist to list "Your List Name"
tell mylist
make new reminder at end with properties {name:eachLine, due date:date "7/10/2014 3:00 PM"}
@ygotthilf
ygotthilf / jwtRS256.sh
Last active July 14, 2024 00:03
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@jordanbrauer
jordanbrauer / README.md
Last active July 14, 2024 14:08
Runes.txt (Diablo II)

Runes.txt

Ladder only runewords, by default, are not able to be used in Single Player in Diablo II: Lord of Destruction.

  1. Download the Runes.txt file below.
  2. Place the Runes.txt file into your Diablo II directory under Diablo II\data\global\excel.
    Please note, these folders may need to be created!
  3. Right click on your Diablo 2 shortcut → properties → Add -direct -txt in the target line after ...\Diablo II\Diablo II.exe
  4. Test runewords!
dev.kasagi.fr.
encolis.com.
ip6.ip-87-98-128.eu.
ip7.ip-87-98-128.eu.
ip8.ip-87-98-128.eu.
87-98-128-9.ovh.net.
87-98-128-11.ovh.net.
ns1.diateam.net.
web4.oiweb.eu.
backup.multiarts.ch.
@Holger-Will
Holger-Will / jwtRS256.sh
Last active May 6, 2024 00:35
generate public private key pair (RSA RS256) for use with koa-jwt jasonwebtoken etc.
# generate private key
openssl genrsa -out private.pem 2048
# extatract public key from it
openssl rsa -in private.pem -pubout > public.pem
@matthewzring
matthewzring / markdown-text-101.md
Last active July 16, 2024 20:50
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

What this guide covers: