Skip to content

Instantly share code, notes, and snippets.

View stavrossk's full-sized avatar
🎯
Focusing

Stavros Skamagkis stavrossk

🎯
Focusing
View GitHub Profile
Latency Comparison Numbers
--------------------------
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
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms
Read 4K randomly from SSD* 150,000 ns 0.15 ms
@stavrossk
stavrossk / Modernizr custom tests.js
Last active December 14, 2015 01:48 — forked from danott/modernizr-tests.js
Modernizr: Custom tests using Modernizr's addTest API.
/* modernizr-test.js
* Daniel Ott
* 3 March 2011
* Custom Tests using Modernizr's addTest API
*/

Programming Achievements: Suggestions from the GitHub Community

Last week, I published some ideas for leveling up as a developer. I put it on GitHub as a gist, and I encouraged people to modify the list to their liking:

Feel free to fork it and add more achievements. (Make sure they're measurable.)

Or, fork it and mark off the achievements you've already conquered. You might even flag the one that you're currently working on.

So far, more than 270 developers have forked this gist. Many devs have customized their forks as personal to-do lists (e.g., crossing off past achievements and highlighting the goal they're currently pursuing). A number of people have also added new achievements to their forks, indicating additional experiences that they

@stavrossk
stavrossk / Git Aliases.txt
Last active December 14, 2015 01:48 — forked from jasonrudolph/git-aliases
Git Aliases.
# git
alias gl='git pull'
alias gp='git push'
alias gd='git diff | mate'
alias gdh='git diff HEAD | mate'
alias gc='git commit -v'
alias gca='git commit -v -a'
alias gcap='git commit -v -a && git push'
alias gb='git branch'
alias gba='git branch -a'

The Lean Startup - Notes, Quotes, and Choice Snippets

Characteristics of a lean startup:

  1. Uses "platforms enabled by open source and free software."

  2. Agile development

@stavrossk
stavrossk / sr_Oblivion_Stutter_Remover.ini
Created February 21, 2013 22:51
The Elder Scrolls IV: Oblivion Stutter Remover (OSR) plugin configuration file.
Master =
{
_comment = You can turn on or off each distinct feature from here.
bManageFPS = 1
bHookCriticalSections = 1
bHookHashtables = 1
bReplaceHeap = 1
bLogToConsole = 0
@stavrossk
stavrossk / Find common string prefix.cs
Last active December 14, 2015 02:09 — forked from junkdog/gist:5011625
Find common prefix from a list of strings.
public static String findCommonPrefix(List<String> strings)
{
if (strings.size() == 0)
return "";
String prefix = strings.get(0);
@stavrossk
stavrossk / Windows Shortcut Resolver.cs
Created February 26, 2013 01:25
Code to resolve Windows .lnk shortcuts and obtain the file path they refer to. Uses shfolder.dll.
using System;
using System.Runtime.InteropServices;
using System.Text;
namespace WindowsGameMetadataRetriever
{
[Flags()]
enum SlgpFlags
{
/// <summary>Retrieves the standard short (8.3 format) file name</summary>
@stavrossk
stavrossk / PublicPatternCatalog.xml
Created February 28, 2013 01:58
JetBrains ReSharper: Sample pattern catalog for Structural Search and Replace.
<CustomPatterns>
<Pattern Severity="SUGGESTION">
<Comment>Method StringBuilder.Append can be converted to StringBuilder.AppendFormat</Comment>
<ReplaceComment>Convert to StringBuilder.AppendFormat</ReplaceComment>
<ReplacePattern>$sb$.AppendFormat($args$)</ReplacePattern>
<SearchPattern>$sb$.Append(string.Format($args$))</SearchPattern>
<Params />
<Placeholders>
<ExpressionPlaceholder Name="sb" ExpressionType="System.Text.StringBuilder" ExactType="True" />
<ArgumentPlaceholder Name="args" Minimal="-1" Maximal="-1" />
@stavrossk
stavrossk / JavaScript CSS style switcher.html
Created March 18, 2013 14:19
Javascript: CSS style switcher.
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<title>Style Changer</title>
<link href=”simpleStyle.css” rel=”stylesheet” rev=”stylesheet” />