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
[localContext MR_saveToPersistentStoreWithCompletion:^(BOOL success, NSError *error) { | |
if (!success) | |
{ | |
NSLog(@"Error: %@", [error description]); | |
} | |
else | |
{ | |
NSLog(@"SAVED"); | |
} | |
}]; |
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
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender | |
{ | |
// Make sure your segue name in storyboard is the same as this line | |
if ([[segue identifier] isEqualToString:@"YOUR_SEGUE_NAME_HERE"]) | |
{ | |
// Get reference to the destination view controller | |
YourViewController *vc = [segue destinationViewController]; | |
// Pass any objects to the view controller here, like... | |
[vc setMyObjectHere:object]; |
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
#import <Foundation/Foundation.h> | |
#include <dlfcn.h> | |
NSDictionary *FCPrivateBatteryStatus() | |
{ | |
static mach_port_t *s_kIOMasterPortDefault; | |
static kern_return_t (*s_IORegistryEntryCreateCFProperties)(mach_port_t entry, CFMutableDictionaryRef *properties, CFAllocatorRef allocator, UInt32 options); | |
static mach_port_t (*s_IOServiceGetMatchingService)(mach_port_t masterPort, CFDictionaryRef matching CF_RELEASES_ARGUMENT); | |
static CFMutableDictionaryRef (*s_IOServiceMatching)(const char *name); |
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
// ==UserScript== | |
// @name Workupload Ad-Block Removal | |
// @namespace http://tampermonkey.net/ | |
// @version 0.8 | |
// @description Removes the sad crying girl that blocks workupload.com when ad-block is active | |
// @author Critter | |
// @match http://tampermonkey.net/index.php?version=4.0&ext=dhdg&updated=true | |
// @grant none | |
// @include http://workupload.com/* | |
// @include http://www.workupload.com/* |
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
function attendee_export_add_phone_split_name( $items ) { | |
$count = 0; | |
foreach ( $items as &$attendee_record ) { | |
// Add the header columns | |
if ( 1 === ++$count ) { | |
$attendee_record[] = 'First Name'; | |
$attendee_record[] = 'Last Name'; | |
$attendee_record[] = 'Phone'; | |
} |
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 | |
/** | |
* Event Tickets Plus and WooCommerce: | |
* Set child input based on forced quantity sync with parent input. | |
* | |
* You need to edit the product IDs (1129 parent and 1128 child in this example code) | |
* | |
* From https://gist.github.com/cliffordp/5a769159a2bf64f0b1b1dbbde243d109 | |
* GIF preview: https://cl.ly/1F1N0h211b1w | |
* |
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 | |
/* | |
* Causes WooCommerce Ticket product pages to stop redirecting to their event page | |
* See https://theeventscalendar.com/knowledgebase/selling-tickets-from-the-woocommerce-products-page/ | |
*/ | |
function tribe_wootix_no_hijack() { | |
if ( ! class_exists( 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main' ) ) return; | |
$woo_tickets = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(); | |
remove_filter( 'post_type_link', array( $woo_tickets, 'hijack_ticket_link' ), 10, 4 ); |
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 | |
tribe_get_template_part( 'wootickets/tickets', null, array( | |
'tickets' => Tribe__Events__Tickets__Tickets::get_all_event_tickets( get_the_ID() ) | |
) ); | |
?> |
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
#!/usr/bin/python | |
import httplib, urllib, sys | |
message = "Download of " + sys.argv[3] + " " | |
serverurl = "$sabserver" | |
print("Converting argument " + sys.argv[7] + " to status.") | |
if(int(sys.argv[7]) == 0): | |
message = "Download of " + sys.argv[3] + " has been completed." |
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
Critter:~ critter$ mdls /Applications/Transmit.app/ | |
_kMDItemDisplayNameWithExtensions = "Transmit.app" | |
_kMDItemRenderData = <09000000 407477c0 41000c> | |
kMDItemAlternateNames = ( | |
"Transmit.app" | |
) | |
kMDItemContentCreationDate = 2018-05-31 21:15:56 +0000 | |
kMDItemContentCreationDate_Ranking = 2018-05-31 00:00:00 +0000 | |
kMDItemContentModificationDate = 2018-06-02 12:56:24 +0000 | |
kMDItemContentType = "com.apple.alias-file" |