Skip to content

Instantly share code, notes, and snippets.

View paddykontschak's full-sized avatar

Patrick Kontschak paddykontschak

View GitHub Profile
@paddykontschak
paddykontschak / 1.md
Created December 29, 2018 19:31 — forked from LotteMakesStuff/1.md
UPM: How to make a custom package

UPM: How to make a custom package So, Unity has this shiny new package manager, and you have code you want to share between projects - wouldn't it be great if we could bundle up our shared code and plug it into all the projects that need it? Let's figure out how to make our own Package!


Todo

  • Modify the project manifest
  • Make a package manifest
  • Package the manifest up with some test code
  • Try it out in Unity!

/* bling.js */
window.$ = document.querySelectorAll.bind(document)
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn)
}
NodeList.prototype.__proto__ = Array.prototype

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

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 / 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 / osx_mountain_lion_setup.md
Last active April 24, 2017 13:48 — forked from jpantuso/osx_lion_rail_setup.md
Personal Setup for OS X 10.8

Setup new Mac with OS X Mountain Lion from scratch

These commands are good as of 2013-01-11.

OS X

Show Library folder in Finder

chflags nohidden ~/Library/