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
{ | |
// The tab key will cycle through the settings when first created | |
// Visit http://wbond.net/sublime_packages/sftp/settings for help | |
// sftp, ftp or ftps | |
"type": "ftp", // set to sftp if secure | |
"save_before_upload": true, | |
"upload_on_save": true, | |
"sync_down_on_open": false, |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>The HTML5 Herald</title> | |
<meta name="description" content="The HTML5 Herald"> | |
<meta name="author" content="SitePoint"> |
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
!default.mode1v3 | |
!default.mode2v3 | |
!default.pbxuser | |
!default.perspectivev3 | |
*.DS_Store | |
*.lock | |
*.mode1v3 | |
*.mode2v3 | |
*.moved-aside | |
*.o |
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
# Convert the .cer file into a .pem file: | |
$ openssl x509 -in aps_development.cer -inform der -out PushChatCert.pem | |
# Convert the private key’s .p12 file into a .pem file: | |
$ openssl pkcs12 -nocerts -in PushChatKey.p12 -out PushChatKey.pem | |
# Finally, combine the certificate and key into a single .pem file | |
$ cat PushChatCert.pem PushChatKey.pem > ck.pem | |
# At this point it’s a good idea to test whether the certificate works. |
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)share:(NSNotification *)notification { | |
UIGraphicsBeginImageContextWithOptions(self.view.bounds.size, NO, 0); | |
[self.view drawViewHierarchyInRect:self.view.bounds afterScreenUpdates:YES]; | |
UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); | |
// high score stuff | |
if ([[NSUserDefaults standardUserDefaults] objectForKey:@"score"]) { | |
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
git add -A; | |
git commit -m "$1"; | |
git push origin $2 |
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 | |
/** | |
* Sample record function for using PDO's rollback transaction funcs.<br /> | |
* <b>By: </b>Kubilay Erdogan | |
* @param array $objects Object objects array (each object must be created) | |
* @return array Result array | |
*/ | |
public function recordObjects($objects = array()) { | |
if (count($objects) == 0) { $objects = $this->objects; } // set fields to self property if empty | |
if (count($objects) == 0) return true; // if still empty, then return. |
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 test() { | |
$sql = "INSERT INTO `table` (`id`, `name`) VALUES (?,?),(?,?) ON DUPLICATE KEY UPDATE `name` = VALUES(`name`) "; | |
$values = array(1, "test", 2, "so so"); | |
$stmt = $this->db->prepare($sql); | |
$stmt->execute($values); | |
} |
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
class camelCaseTiny(object): | |
name = "camelCaseTiny" | |
style = 'camelCase' # can also be snakeCase | |
getter = """ | |
public function get%(normalizedName)s() { return $this->%(name)s; }""" | |
setter = """ | |
public function set%(normalizedName)s(%(typeHint)s $%(name)s) { $this->%(name)s = $%(name)s; }""" |
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
echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile |
OlderNewer