Skip to content

Instantly share code, notes, and snippets.

View tomsiwik's full-sized avatar
🔴
Recording

Tom Siwik tomsiwik

🔴
Recording
View GitHub Profile
@klamping
klamping / writeup.md
Last active February 7, 2018 17:58
Wraith-Travis Integration

Easy UI Regression Testing with Wraith and TravisCI

Introduction

In the past four years, I've learned the hard way about how painful it can be to try and update a codebase used by a large number of applications. Changes that seem innocent can break a specific use case that wasn't anticipated. Do enough manual regression testing and you will catch the bugs, but it's' costly and time consuming process. When things are costly and time consuming, they usually stop being done.

This is why I focus a lot of my efforts towards build process automation. Computers are fantastic about doing boring, repetitive work and never complaining. If you can get them to do the boring chores for you, you spend more time doing the fun, challenging work.

UI Regression testing is one of those spots where I'm looking for automation scripts to take over. Not only because playing "spot the difference" between your builds is boring, but also because [we're horrible at it](http://en.wikipedia.org/wiki/Chan

@jmvrbanac
jmvrbanac / Perforce-Gitconfig
Last active July 11, 2018 11:50
Setting up p4merge and diff on Mac OSX
# Other Stuff
[merge]
tool = p4merge
keepBackup = false
[mergetool "p4merge"]
cmd = p4merge "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
keepTemporaries = false
trustExitCode = false
keepBackup = false
[diff]
@sebastiandeutsch
sebastiandeutsch / db.py
Created September 21, 2015 11:25
Convert MySQL to Postres
#!/usr/bin/env python
"""
Fixes a MySQL dump made with the right format so it can be directly
imported to a new PostgreSQL database.
Dump using:
mysqldump --compatible=postgresql --default-character-set=utf8 -r databasename.mysql -u root databasename
"""
@r17x
r17x / setupTest.md
Last active April 22, 2019 11:34
Setup Test in ReactJs With Jest Enzyme & etc
  • create setupTests.js in src/setupTests.js (automatically CRA read setupTest.js)
// setupTests.js
import React from "react";
import Adapter from "enzyme-adapter-react-16";
import Enzyme, { configure, shallow, mount, render } from "enzyme";
import { createSerializer } from "enzyme-to-json";
import sinon from "sinon";

expect.addSnapshotSerializer(createSerializer({ mode: "deep" }));
@zish
zish / vpnc-script
Last active June 13, 2022 18:47
OpenConnect vpnc-script for for MacOS High Sierra. Resolves problem with split DNS.
#!/bin/sh
#
# Originally part of vpnc source code:
# © 2005-2012 Maurice Massar, Jörg Mayer, Antonio Borneo et al.
# © 2009-2012 David Woodhouse <dwmw2@infradead.org>
#
# 2018-05-15 - Minor scutil updates for MacOS Split DNS added by Jeremy Melanson ( https://github.com/zish ).
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@milankorsos
milankorsos / redux-actions.ts
Last active November 10, 2022 10:58
Correct TypeScript typing example for Redux Thunk actions
import {Action, ActionCreator, Dispatch} from 'redux';
import {ThunkAction} from 'redux-thunk';
// Redux action
const reduxAction: ActionCreator<Action> = (text: string) => {
return {
type: SET_TEXT,
text
};
};
@eladg
eladg / Heights-shader.frag
Last active November 22, 2022 06:24
WebGL-HeatMap - Shaders in GLSL
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp int;
precision highp float;
#else
precision mediump int;
precision mediump float;
#endif
varying vec2 off, dim;
varying float vIntensity;
@Manu343726
Manu343726 / gist:ca0ceb224ea789415387
Created September 19, 2015 18:15
Running ARM docker image with QEMU on x86_64 Arch Linux host
# Install quemu, docker, etc
yaourt -S qemu qemu-user-static binfmt-support
# The quemu-user-static AUR package is outdated and broken. The .deb package they pull is no longer in the ubuntu repository.
# Edit the PKGBUILD and use qemu-user-static_2.4+dfsg-3_amd64.deb (With SHA1 sum "84d83a16c60c82b6c579f2f750b04a3ac26c249b")
# Enable ARM emulation
update-binfmts --enable qemu-arm
@jczaplew
jczaplew / postgis2geojson.py
Last active March 23, 2023 19:08
A tool for extracting data from PostGIS into GeoJSON and TopoJSON. UPDATE: Added a dedicated repo for contributions - https://github.com/jczaplew/postgis2geojson
'''
A simple tool for exporting from a PostGIS table to GeoJSON and TopoJSON. Assumes Python 2.7+,
psycopg2, and TopoJSON are already installed and in your PATH.
Adapted from Bryan McBride's PHP implementation
(https://gist.github.com/bmcbride/1913855/)
by John Czaplewski | jczaplew@gmail.com | @JJCzaplewski
TODO:
- Add argument for SRS
@zhiguangwang
zhiguangwang / README.md
Last active August 25, 2023 12:47
Disable and Enable kdc on Mac OS X

If you don't like or need the kdc process on Mac OS X, which opens TCP port 88 to the world, you can disable it with launchctl.

Disable:

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.Kerberos.kdc.plist

Enable:

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.Kerberos.kdc.plist