Skip to content

Instantly share code, notes, and snippets.

View tomatolog's full-sized avatar

Stas tomatolog

View GitHub Profile
@d-rome
d-rome / markdownfeatures.markdown
Created July 26, 2011 05:51
Condensed compilation of Markdown features

Introduction to Markdown

This is an example of the markdown language as displayed by github. For the best results, compare this markdown to the raw text side by side. The information is primarily from Daring Fireball, but condensed into one big example with commentary limited to gotchas. This line will continue the previous paragraph.
Two spaces at the end of the line denotes a new line.

An empty line adds an empty line in addition to denoting a new line. This behavior is the same with or without spaces.

word_with_underscores_stays_the_same
italicized word
bolded word

@ovatsus
ovatsus / Setup.fsx
Created March 17, 2012 17:07
Script to setup F# Interactive session, loading everything in the current solution
#r "System.Xml.Linq"
open System
open System.IO
open System.Xml.Linq
let script = seq {
//TODO: this currently loads fsproj's in alphabeticall order, we should instead
//build the dependencies graph of the fsproj's and load them in topological sort order
@zziuni
zziuni / stuns
Created September 18, 2012 08:05
STUN server list
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net
@swlaschin
swlaschin / type-dependency-graph.fsx
Last active September 16, 2024 16:53
This script analyzes the dependencies between top level types in a .NET Assembly. It is then used to compare the dependency relationships in some F# projects with those in some C# projects.
(*
This script analyzes the dependencies between top level types in a .NET Assembly.
It is then used to compare the dependency relationships in some F# projects with those in some C# projects.
Note that no attempt has been made to optimize the code yet!
REQUIRES:
* Mono.Cecil for code analysis
From http://www.mono-project.com/Cecil#Download
@borisbat
borisbat / gist:8308442
Created January 7, 2014 22:54
Tangent space
mat3 cotangent_frame( vec3 N, vec3 p, vec2 uv )
{
// get edge vectors of the pixel triangle
vec3 dp1 = dFdx( p );
vec3 dp2 = dFdy( p );
vec2 duv1 = dFdx( uv );
vec2 duv2 = dFdy( uv );
// solve the linear system
vec3 dp2perp = cross( dp2, N );
@staltz
staltz / introrx.md
Last active November 17, 2024 01:08
The introduction to Reactive Programming you've been missing
@tobek
tobek / get-image-urls.js
Last active November 16, 2024 05:00
Save images from chrome inspector/dev tools network tab
/* open up chrome dev tools (Menu > More tools > Developer tools)
* go to network tab, refresh the page, wait for images to load (on some sites you may have to scroll down to the images for them to start loading)
* right click/ctrl click on any entry in the network log, select Copy > Copy All as HAR
* open up JS console and enter: var har = [paste]
* (pasting could take a while if there's a lot of requests)
* paste the following JS code into the console
* copy the output, paste into a text file
* open up a terminal in same directory as text file, then: wget -i [that file]
*/
@ctaggart
ctaggart / 3.0 to 3.1.fsi
Created December 27, 2014 02:13
FSharp.Core Surface Area Diff (what is new)
[<AutoOpen>]
module Microsoft.FSharp.Reflection.FSharpReflectionExtensions
/// Creates an instance of a record type.
val MakeRecord : recordType:Type * values:obj [] * ?allowAccessToPrivateRepresentation:bool -> obj
/// Reads all the fields from a record value.
val GetRecordFields : record:obj * ?allowAccessToPrivateRepresentation:bool -> obj []
/// Precompute a function for reading all the fields from a record. The fields are returned in the
@domenic
domenic / v8-versions.md
Last active December 11, 2020 01:45
V8 versions for embedders

Embedders of V8 should generally use the head of the branch corresponding to the minor version of V8 that ships in Chrome.

Finding the minor version of V8 corresponding to the latest stable Chrome

To find out what version this is,

  1. Go to https://omahaproxy.appspot.com/
  2. Find the latest stable Chrome version in the table
  3. Enter it into the "Translate a Chrome verison to a V8 version" box below the table.
  4. Ignore the last two parts.

Git DMZ Flow

I've been asked a few times over the last few months to put together a full write-up of the Git workflow we use at RichRelevance (and at Precog before), since I have referenced it in passing quite a few times in tweets and in person. The workflow is appreciably different from GitFlow and its derivatives, and thus it brings with it a different set of tradeoffs and optimizations. To that end, it would probably be helpful to go over exactly what workflow benefits I find to be beneficial or even necessary.

  • Two developers working on independent features must never be blocked by each other
    • No code freeze! Ever! For any reason!
  • A developer must be able to base derivative work on another developer's work, without waiting for any third party
  • Two developers working on inter-dependent features (or even the same feature) must be able to do so without interference from (or interfering with) any other parties
  • Developers must be able to work on multiple features simultaneously, or at lea