Skip to content

Instantly share code, notes, and snippets.

View stavrossk's full-sized avatar
🎯
Focusing

Stavros Skamagkis stavrossk

🎯
Focusing
View GitHub Profile
@stavrossk
stavrossk / README.md
Created February 19, 2013 21:22 — forked from jaydson/README.md

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
#include<stdio.h>
#include<stdlib.h>
#include<netdb.h>
#include<arpa/inet.h>
int main(int argc, char **argv) {
struct hostent *host;
char str[100];
char addr[INET_ADDRSTRLEN];
CL-USER> (test-steinhart-hart)
Steinhart-hart coefficients for the ACI/10K-CP curve are:
A: 0.0011212672
B: 2.3534849E-4
C: 8.3802405E-8
Resistance: 336450.0 Expected: -40.0 Calculated: -39.999985
Resistance: 242660.0 Expected: -35.0 Calculated: -35.009888
Resistance: 176960.0 Expected: -30.0 Calculated: -30.018707
Resistance: 130410.0 Expected: -25.0 Calculated: -25.02591
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 / 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);