Skip to content

Instantly share code, notes, and snippets.

View paddykontschak's full-sized avatar

Patrick Kontschak paddykontschak

View GitHub Profile
@paddykontschak
paddykontschak / gist:c4d9dc93922350ea12e7
Created February 26, 2015 21:53
Ruii says he's sorry!
[22:42:07] Direwolves: Sorry but I dont PVP
[22:42:10] Ruii: oKE
[22:42:12] Direwolves: SO idk how other spells works
[22:42:14] Direwolves: so fuck off
[22:42:18] Ruii: Oooh
[22:42:20] Ruii: what the hell
[22:42:25] Ruii: Why so pissed?
[22:42:41] Capngoat hugs Dire
[22:42:41] Ruii: I am sorry if you got offended
[22:42:42] Direwolves: Why?

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2

Results

@paddykontschak
paddykontschak / gist:6159561
Created August 5, 2013 20:59
Nehra Player
  • Karris
  • Bloody-fang
  • Retribution
  • Retired
  • Ember
  • Marduk
  • Nysos
  • Teya
  • Cyril
  • Lakritz
sudo defaults write /Library/Preferences/com.apple.windowserver DisplayResolutionEnabled -bool YES;
sudo defaults delete /Library/Preferences/com.apple.windowserver DisplayResolutionDisabled;
// by the way, you need to logout and log back in for this to take effect. Or at least that's what
// Quartz Debug says. Who knows, maybe it's lying?
// P.S. Go to [Apple menu --> System Preferences --> Displays --> Display --> Scaled] after logging
// back in, and you'll see a bunch of "HiDPI" resolutions in the list to choose from.

Twitter公式クライアントのコンシューマキー

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPad

Consumer key: CjulERsDeqhhjSme66ECg

@paddykontschak
paddykontschak / hover.html
Created October 29, 2012 16:15
Always “hover” before you click!? Wrong.
<!doctype html>
<head>
<!-- Taken from http://www.frameloss.org/2012/10/28/hover-fail/ --->
<script>
function tricked() {
document.getElementById("naughty").href="http://www.frameloss.org";
}
</script>
</head>
@paddykontschak
paddykontschak / paypal.md
Created October 16, 2012 16:55 — forked from nikolaplejic/gist:3654637
How to copy/paste your password in PayPal's change password form

PayPal blocks copy/paste actions in their "change password" form, citing some irrelevant security issues as the reason. That's a load of crap, and they know it -- disabling copy/paste makes it a lot harder to use a decent password generator and a lot easier to screw up your pwd when retyping, especially if it's a long one (as it should be!).

So, here's the quick'n'dirty way to use an externally generated password in your PayPal account:

@paddykontschak
paddykontschak / invitation.js
Created September 18, 2012 04:00
invitation
// define variables
var luisStatus;
var karinaStatus;
var karinaLocation;
var today = "Sunday";
// Check Karina's status and today's weekday
if(karinaStatus == "free" && today == "Monday") {
// if Karina is free and today is Monday, change Luis' and Karina's status
luisStatus = "Dining with Karina";
@paddykontschak
paddykontschak / noise.coffee
Created September 12, 2012 19:25
Generate noise with canvas
generateNoise = (opacity) ->
return false unless !!document.createElement("canvas").getContext
canvas = document.createElement("canvas")
ctx = canvas.getContext("2d")
x = undefined
y = undefined
number = undefined
opacity = opacity or .2
canvas.width = 45
canvas.height = 45
@paddykontschak
paddykontschak / .vromerc
Created September 12, 2012 02:03
My Vrome Settings
set searchengines+={"duckduckgo":“http://duckduckgo.com/?q={{keyword}}"}
set defaultsearch=duckduckgo
map h 5h
map j 5j
map k 5k
map l 5l
set disablesites=mail.google.com, reader.google.com, reddit.com, duckduckgo.com, github.com, bitbucket.org // don’t run Vrome in those sites
set showstatus=0
set editor=vim -f