Export your public key:
keybase pgp export > keybase-public.key
Export your private key:
keybase pgp export --secret > keybase-private.key
function hexToRgb(hex) { | |
var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i; | |
hex = hex.replace(shorthandRegex, function (m, r, g, b) { | |
return r + r + g + g + b + b; | |
}); | |
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); | |
return result ? { | |
r: parseInt(result[1], 16), | |
g: parseInt(result[2], 16), |
Export your public key:
keybase pgp export > keybase-public.key
Export your private key:
keybase pgp export --secret > keybase-private.key
// Welcome! require() some modules from npm (like you were using browserify) | |
// and then hit Run Code to run your code on the right side. | |
// Modules get downloaded from browserify-cdn and bundled in your browser. | |
const Joi = require('joi'); | |
const categoryConfigSchema = Joi.object().keys({ | |
contentTypes: Joi.array().items(Joi.string()).default([]), | |
minSelected: Joi.number().integer().min(0).default(0), | |
maxSelected: Joi.number().integer().min(-1).default(-1), |
#!/bin/sh | |
echo -e "this is revision 5" |
I hereby claim:
To claim this, I am signing this object:
# This is a bash script meant to be run on the command line. Requires imagemagick (apt-get install imagemagick) | |
## THIS WILL OVERWRITE YOUR FILES, uses sudo and may not require it. | |
for file in /path/to/files/*/*.jpg; do sudo convert $file -resize '800x600>' -density 72 $file; done | |
### another method using resolution (800*600) | |
for file in /path/to/files/*/*.jpg; do sudo convert $file -resize '480000@>' -density 72 $file; done | |
### example of *not* overwriting files | |
for file in /path/to/files/*/*.jpg; do sudo convert $file -resize '800x600>' -density 72 converted-$file; done |
#!/bin/sh | |
# | |
# Orinally made by Lovell Fuller for sharp | |
# https://github.com/lovell/sharp | |
# | |
# Usage: | |
# curl -s https://gist.githubusercontent.com/vivekvasani/4dab3ff0f505fe4b2027/raw/bf3d0743107f02f5db2b93c53f7f0e07a1c33112/libvips-installer.sh | sudo bash - | |
# |
// Check if Base SDK is set to desired SDK version and throw error if it doesn't match | |
#if __IPHONE_OS_VERSION_MAX_ALLOWED != __IPHONE_6_1 | |
#error App should be built using iOS 6.1 SDK | |
#else | |
#endif |
- (void)main | |
{ | |
[self doStuffInOperations]; | |
} | |
- (void)doStuffInGCD | |
{ | |
dispatch_group_t d_group = dispatch_group_create(); | |
dispatch_queue_t bg_queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); |