This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo spctl --master-enable | |
$ sudo spctl --master-disable | |
# Read more: http://forums.appleinsider.com/t/143736/gatekeeper-is-hidden-in-os-x-10-7-3-lion-developers-can-preview-it-now |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VERSION=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "${SOURCE_ROOT}/${INFOPLIST_FILE}") | |
BUILD=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${SOURCE_ROOT}/${INFOPLIST_FILE}") | |
# The build number gets automatically increased by a build phase | |
BUILD=$((BUILD - 1)) | |
DATE=$(/bin/date +%Y%m%d%H%M%S) | |
OUTPUT_DIR="${HOME}/Desktop/${TARGET_NAME}_v${VERSION}b${BUILD}_${DATE}" | |
mkdir "$OUTPUT_DIR" | |
# Zip and copy .dSYM | |
cd "${ARCHIVE_DSYMS_PATH}/" | |
/usr/bin/zip -r "$OUTPUT_DIR/${TARGET_NAME}.dSYM.zip" "${TARGET_NAME}.app.dSYM" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Apparently YouTube changed some stuff. This makes VLC play YouTube clips again. | |
-- Replace youtube.lua in /Applications/VLC.app/Contents/MacOS/share/playlist/youtube.lua. | |
-- Ticket @ VLC: https://trac.videolan.org/vlc/ticket/7471 | |
--[[ | |
$Id$ | |
Copyright © 2007-2011 the VideoLAN team | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension NSDirectionalEdgeInsets { | |
/// Returns new insets with just a value applied to the supplied edge. | |
/// | |
/// - Parameters: | |
/// - edge: The edge to apply an inset to. | |
/// - value: The value to set the edge inset to. | |
init(_ edge: WritableKeyPath<Self, CGFloat>, _ value: CGFloat) { | |
self.init( | |
top: edge == \.top ? value : 0.0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Based on http://www.bdunagan.com/2010/09/25/cocoa-tip-enabling-launch-on-startup/ | |
// Almost automatic convert to ARC, might need tweaking. | |
#import "PreferencesManager.h" | |
@implementation PreferencesManager | |
// MIT license | |
- (BOOL)isLaunchAtStartup { | |
// See if the app is currently in LoginItems. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Just append 2>&1 to the command to redirect all ouput to standard out instead of the error stream. | |
Source: http://stackoverflow.com/questions/714740/php-exec-is-failing-silently |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Also show custom post types in tag/category/archive pages | |
*/ | |
function query_post_type($query) { | |
if(is_category() || is_tag()) { | |
$post_type = get_query_var('post_type'); | |
if($post_type) { | |
$post_type = $post_type; | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Organizes a directory of games into a more convenient layout: | |
# | |
# Games/ | |
# - 0-9/ | |
# - A/ | |
# - B-D/ | |
# - E-H/ | |
# - I/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Source: http://www.anddev.org/resize_and_rotate_image_-_example-t621.html | |
// load the origial BitMap (500 x 500 px) | |
Bitmap bitmapOrg = BitmapFactory.decodeResource(getResources(), | |
R.drawable.android); | |
int width = bitmapOrg.width(); | |
int height = bitmapOrg.height(); | |
int newWidth = 720; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Download a copy of the manual, you'll need wget (brew install wget) | |
# | |
wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --random-wait --domains mrjester.hapisan.com --no-parent http://mrjester.hapisan.com/04_MC68/Index.html | |
cd mrjester.hapisan.com/04_MC68 | |
# |
NewerOlder