Skip to content

Instantly share code, notes, and snippets.

View thlorenz's full-sized avatar
👁️
{ this.props.status }

Thorsten Lorenz thlorenz

👁️
{ this.props.status }
View GitHub Profile
from ubuntu:12.10
maintainer Thorsten Lorenz <thlorenz@gmx.de>
run apt-get update
run apt-get upgrade -y
run apt-get install -y build-essential
add . /src
from dockerfile/nodejs
add https://github.com/thlorenz/redeyed/archive/v0.4.4.tar.gz /src
workdir /src
entrypoint [ "npm" ]
/*
Browserify Live Demos!
How to make your own:
1. Clone this RequireBin
2. Adjust the REQUIRES section
3. Create a gist with demo snippets that can be run
4. Put the id for that gist into the demoGist variable
*/
/* REQUIRES: Put modules you need in your demo in this Array */
@thlorenz
thlorenz / index.js
Created June 14, 2014 17:50
requirebin sketch
var d3Gauge = require('d3-gauge')
, xtend = require('xtend')
, insertCss = require('insert-css')
var gauges = [];
var small = {
size : 100
, min : 0
, max : 50
, transitionDuration : 500
@thlorenz
thlorenz / Encryption and Decryption with the crypto module: cipher-API-replpad-log
Last active August 29, 2015 14:10
Encryption and Decryption with the crypto module
pad > crypto.getHashes().length
46
pad > crypto.getCiphers().length
108
crypto.getHashes()
[ 'DSA',
'DSA-SHA',
'DSA-SHA1',
@thlorenz
thlorenz / scriptie-talkie-flags.md
Created March 31, 2015 19:12
Outlines how binary flags work.

Scriptie Talkie Log

In case this doesn't work in your browser.

Outlines how binary flags work.

Script

var alive = parseInt('0001', 2);
@thlorenz
thlorenz / v8-project.md
Last active August 29, 2015 14:18
Get complete v8 Project

Steps to checkout v8 source and initialize it properly. This includes tests, d8 and example projects.

## get source and initialize dependencies
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git && cd depot_tools
export PATH=`pwd`:$PATH

cd ../
mkdir v8_checkout &amp;&amp; cd v8_checkout
@thlorenz
thlorenz / Copy Netflix List.md
Last active August 29, 2015 14:26
Copy Netflix List sorted by title to Clipboard
  1. Go to My List
  2. Open DevTools
  3. Paste the below code into the console
  4. Hit Enter
  5. Your list is in your clipboard sorted by title
var cards = document.getElementsByClassName("smallTitleCard"), s = [], title;
for (var i = 0; i < cards.length; i++) {
 title = cards.item(i).attributes.getNamedItem('aria-label').textContent;
@thlorenz
thlorenz / git_svn_ps_prompt.ps1
Created August 15, 2010 14:53
Svn/Git PowerShell prompt
# See http://gist.github.com/180853 for gitutils.ps1.
. (Resolve-Path ~/Documents/WindowsPowershell/gitutils.ps1)
function prompt {
writeUserLocation
if (isCurrentDirectoryGitRepository) {
writeGitInfo
}
@thlorenz
thlorenz / Cascading Styles WPF
Created October 23, 2010 00:54
Shows a way to inherit styles and add to it in WPF
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid>
<Grid.Resources>
<Style BasedOn="{StaticResource {x:Type Button}}" TargetType="{x:Type Button}">
<Setter Property="Background" Value="Blue"/>
</Style>
</Grid.Resources>
<Border
HorizontalAlignment="Center"
VerticalAlignment="Center"