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 | |
/* | |
* Usage for a custom post type named 'movies': | |
* unregister_post_type( 'movies' ); | |
* | |
* Usage for the built in 'post' post type: | |
* unregister_post_type( 'post', 'edit.php' ); | |
*/ | |
function unregister_post_type( $post_type, $slug = '' ){ |
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
//Create store and moc: | |
NSURL *baseURL = [NSURL URLWithString:myUrl]; | |
RKObjectManager *objectManager = [RKObjectManager managerWithBaseURL:baseURL]; | |
//not sure what this does but it's in example project | |
NSManagedObjectModel *managedObjectModel = [NSManagedObjectModel mergedModelFromBundles:nil]; | |
RKManagedObjectStore *managedObjectStore = [[RKManagedObjectStore alloc] initWithManagedObjectModel:managedObjectModel]; | |
objectManager.managedObjectStore = managedObjectStore; | |
NSString *modelPath = nil; |
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 killall -HUP mDNSResponder |
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
$("#check-all").click(function() { | |
$(':checkbox').each(function() { | |
this.checked = !this.checked; | |
}); | |
}); |
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
$window = $(window); | |
$('section').each(function(){ | |
var $this = $(this); // assigning the object | |
var off = $this.offset().top; | |
$this.data("top", off); | |
$(window).bind('resize scroll', function() { |
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
/*\ | |
Animate collapsible set; | |
\*/ | |
$(document).one("pagebeforechange", function () { | |
// animation speed; | |
var animationSpeed = 200; | |
function animateCollapsibleSet(elm) { |
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 | |
// Controller | |
// | |
// Company fields => address_id, idenity_id | |
// | |
public function actionCreate() | |
{ | |
$model = new Company; |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
curl -s https://myurl.com/script.sh | bash /dev/stdin param1 param2 |