Skip to content

Instantly share code, notes, and snippets.

View thomaschaaf's full-sized avatar

Thomas Schaaf thomaschaaf

View GitHub Profile
@thomaschaaf
thomaschaaf / Usage.md
Last active December 12, 2024 10:43
Using helm to dynamically set heap size limit based on pod memory limit

We wanted to set the max old space size based on the memory limit so that the heap size inside out kubernetes pods is used better.

env:
  - name: NODE_OPTIONS
    value: '--max-old-space-size={{include "calculateJSHeapFromPodMemory" .memory}} --max-semi-space-size=16'
Logged out*
Splash screen*
Swipe -> Login page
Login page
Login with existing user -> Logged in
Password forgotten -> Forgot password
Login with facebook -> Logged in
Login with google -> Logged in
Forgot password
Back -> Login page
@thomaschaaf
thomaschaaf / gist:c8f257bb8bc5ce03e48e
Last active August 29, 2015 14:17
Postbank Scaper CasperJS PhantomJS node.js
casper = require('casper').create()
casper.start "https://banking.postbank.de/rai/login", ->
loginInfo =
'nutzername': "12345678"
'kennwort': "XXXXX"
@fill "form.form-cn", loginInfo, true
casper.then ->
@thomaschaaf
thomaschaaf / gist:10233843
Created April 9, 2014 07:00
Node.JS FTDI FT245R USB Relay FIFO A9022SLX
// npm install ftdi
var ftdi = require('ftdi');
ftdi.find(function(err, devices) {
var device = new ftdi.FtdiDevice(devices[0]);
device.on('error', function(err) {
console.log(err);
});
4033 be/4 swift 23.18 K/s 0.00 B/s 0.00 % 3.53 % python /usr/bin/swift-object-server /etc/swift/object-server.conf
4040 be/4 swift 7.73 K/s 0.00 B/s 0.00 % 3.52 % python /usr/bin/swift-object-server /etc/swift/object-server.conf
4039 be/4 swift 15.45 K/s 0.00 B/s 0.00 % 2.92 % python /usr/bin/swift-object-server /etc/swift/object-server.conf
4038 be/4 swift 7.73 K/s 0.00 B/s 0.00 % 2.91 % python /usr/bin/swift-object-server /etc/swift/object-server.conf
4035 be/4 swift 7.73 K/s 0.00 B/s 0.00 % 2.43 % python /usr/bin/swift-object-server /etc/swift/object-server.conf
4027 be/4 swift 7.73 K/s 0.00 B/s 0.00 % 2.38 % python /usr/bin/swift-object-server /etc/swift/object-server.conf
4034 be/4 swift 23.18 K/s 0.00 B/s 0.00 % 2.13 % python /usr/bin/swift-object-server /etc/swift/object-server.conf
4036 be/4 swift 11.59 K/s 0.00 B/s 0.00 % 1.94 % python /usr/bin/swift-object-server /etc/swift/object-server.conf
4031 be/4 swift
@thomaschaaf
thomaschaaf / gist:7344891
Last active December 21, 2019 04:41
Basic wx Application which shows a snake in the System Tray and on open and close of the context menu displays a message in the console.
#!/usr/bin/env pythonw
import wx
import wx.lib.embeddedimage
WXPdemo = wx.lib.embeddedimage.PyEmbeddedImage(
"iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAWlJ"
"REFUWIW1V1sSwjAIBMebeBU9db2KZ8EPmxbCI4TUnXGskWaXDQktwhjErjERP4XRhER08iPi"
"5SKiyQR5JyI7xxB3j7wn5GI6V2hFxM0gJtjYANFBiIjQu7L/1lYlwR0QxLDZhE0II1+CtwRC"
"RI8riBva7DL7CC9VAwDbbxwKtdDXwBi7K+1zCP99T1vDFedd8FBwYd6BCAUXuACEF7QsbET/"
var express = require('express')
, routes = require('./routes')
, formidable = require("formidable");
var config = require("./config");
var app = module.exports = express.createServer();
// Configuration
/**
* Module dependencies.
*/
var express = require('express')
, routes = require('./routes')
, formidable = require("formidable");
var config = require("./config");