Skip to content

Instantly share code, notes, and snippets.

Avatar

Kevin Charles kevinchar93

  • AND Digital
  • Yorkshire
View GitHub Profile
@Tamal
Tamal / git-ssh-error-fix.sh
Last active June 6, 2023 09:08
Solution for 'ssh: connect to host github.com port 22: Connection timed out' error
View git-ssh-error-fix.sh
$ git clone git@github.com:xxxxx/xxxx.git my-awesome-proj
Cloning into 'my-awesome-proj'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
$ # This should also timeout
$ ssh -T git@github.com
ssh: connect to host github.com port 22: Connection timed out
$ # but this might work
@alvarow
alvarow / print-headers.jsp
Last active April 10, 2020 20:13
Print HTTP request headers in JSP
View print-headers.jsp
<%@ page import="java.util.*" %>
<html>
<head>
<title>Http Request Headers Example in JSP</title>
</head>
<body>
<h2>HTTP Request Headers Received</h2>
<table>
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active June 6, 2023 05:50
OS X Screencast to animated GIF
View GIF-Screencast-OSX.md

OS X Screencast to animated GIF

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

Screencapture GIF

Instructions

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

@jboner
jboner / latency.txt
Last active June 7, 2023 23:59
Latency Numbers Every Programmer Should Know
View latency.txt
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