Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
# frozen_string_literal: true | |
# Creates a new blob on the server side in anticipation of a direct-to-service upload from the client side. | |
# When the client-side upload is completed, the signed_blob_id can be submitted as part of the form to reference | |
# the blob that was created up front. | |
class ActiveStorage::DirectUploadsController < ActiveStorage::BaseController | |
skip_before_action :verify_authenticity_token, :only => [:create] | |
def create | |
blob = ActiveStorage::Blob.create_before_direct_upload!(blob_args) |
sudo fallocate -l 1G /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
sudo swapon --show | |
sudo cp /etc/fstab /etc/fstab.bak | |
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab | |
sudo sysctl vm.swappiness=10 | |
echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf | |
sudo sysctl vm.vfs_cache_pressure=50 |
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work. | |
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0." | |
Database files have to be updated before starting the server, here are the steps that had to be followed: | |
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default | |
brew unlink postgresql | |
brew install [email protected] | |
brew unlink [email protected] | |
brew link postgresql |
@interface SBDeviceLockController : NSObject | |
+(id)sharedController; | |
-(BOOL)attemptDeviceUnlockWithPassword:(id)password appRequested:(BOOL)requested; | |
-(void)_clearBlockedState; | |
@end | |
%hook SpringBoard | |
-(void)applicationDidFinishLaunching:(id)application { | |
%orig; |
04/26/2103. From a lecture by Professor John Ousterhout at Stanford, class CS142.
This is my most touchy-feely thought for the weekend. Here’s the basic idea: It’s really hard to build relationships that last for a long time. If you haven’t discovered this, you will discover this sooner or later. And it's hard both for personal relationships and for business relationships. And to me, it's pretty amazing that two people can stay married for 25 years without killing each other.
[Laughter]
> But honestly, most professional relationships don't last anywhere near that long. The best bands always seem to break up after 2 or 3 years. And business partnerships fall apart, and there's all these problems in these relationships that just don't last. So, why is that? Well, in my view, it’s relationships don't fail because there some single catastrophic event to destroy them, although often there is a single catastrophic event around the the end of the relation
#import <UIKit/UIKit.h> | |
@import SafariServices; | |
@interface AViewController : UIViewController | |
// | |
// ... | |
// | |
@end |
<?php | |
/** | |
* simple method to encrypt or decrypt a plain text string | |
* initialization vector(IV) has to be the same when encrypting and decrypting | |
* | |
* @param string $action: can be 'encrypt' or 'decrypt' | |
* @param string $string: string to encrypt or decrypt | |
* | |
* @return string | |
*/ |
Note: Possibly outdated
Note: This is more of a personal reference. You should never install/add keys/libs/programs you yourself don't trust or know are safe.
Check https://www.spotify.com/us/download/linux/ for the official scoop.