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 UIKit | |
import _Concurrency | |
class SendSelectedPhotoWithEmailViewController: UIViewController { | |
override func viewDidAppear(_ animated: Bool) { | |
super.viewDidAppear(animated) | |
// self.startFlow_PoD() | |
self.startFlow_AsyncAwait() | |
} |
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 | |
function sendMailerMail($recipient, $subject, $email_content) | |
{ | |
// include phpmailer class and initialize | |
require_once __dir__ . 'class.phpmailer.php'; | |
$mail = new PHPMailer(); | |
// // | |
// set up mail server settings | |
// sample for gmail |
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 |
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
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
<?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
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
- (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
# 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
!default.mode1v3 | |
!default.mode2v3 | |
!default.pbxuser | |
!default.perspectivev3 | |
*.DS_Store | |
*.lock | |
*.mode1v3 | |
*.mode2v3 | |
*.moved-aside | |
*.o |
NewerOlder