This file contains hidden or 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
// Truncate Table | |
DB::table('table')->delete(); | |
// Extract Data | |
$json = File::get('data.json'); | |
// Parse Json | |
$data = json_decode($json, true); // true for assoc array | |
// Mass insert |
This file contains hidden or 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
# | |
# Host: example.com | |
# | |
<VirtualHost *:80> | |
ServerAdmin dev@example.com | |
ServerName example.com | |
ServerAlias example.com | |
DocumentRoot /var/www/html/deploy/example.com/home |
This file contains hidden or 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 | |
/* | |
|---------------------------------------------- | |
| Frontend - (Public) | |
|---------------------------------------------- | |
*/ | |
Route::group([ | |
'namespace' => 'Frontend', | |
], function(){ |
This file contains hidden or 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
<VirtualHost *:80> | |
ServerAdmin dev@[agency.com] | |
ServerName subdomain.dev.[agency.com] | |
DocumentRoot /var/www/html/develop/[project] | |
ErrorLog /var/log/httpd/[project].dev.[agency.com].error_log | |
CustomLog /var/log/httpd/[project].dev.[agency.com].access_log combined | |
</VirtualHost> |
This file contains hidden or 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
#ifndef DEBUG | |
#define NSLog(...) /* suppress NSLog when in release mode */ | |
#endif |
This file contains hidden or 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
public enum OauthError: ErrorType { | |
case AuthorizationUrlGeneration(NSError) | |
case StateInconsistence | |
case InvalidRedirectUrl | |
case MissingParameter | |
case StateMismatch | |
case APIError(NSError) | |
case InvalidResponse | |
case TokenNotFound | |
case Unknown |
This file contains hidden or 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
# This creates a warning for every TODO/FIXME/WARNING comment in all your files | |
TAGS="TODO:|FIXME:|WARNING:" | |
find "${SRCROOT}" \( -name "*.h" -or -name "*.m" -or -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$" | perl -p -e "s/($TAGS)/ warning: \$1/" |
This file contains hidden or 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 | |
// Put your device token here (without spaces): | |
$deviceToken = '67adf9c7a00b2e2cb8a79911f1656ead158bdebd26618cbb4585b7'; | |
// Put your private key's passphrase here: | |
$passphrase = 'terere'; | |
// Put your alert message here: | |
$message = 'My first push notification!'; |
This file contains hidden or 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/env bash | |
PODS="Pods/" | |
if [ -d "$PODS" ]; then | |
rm -rf "${HOME}/Library/Caches/CocoaPods" | |
rm -rf "$PODS" & rm -rf Podfile.lock | |
pod install | |
else | |
echo "No existe el directorio $PODS" |
This file contains hidden or 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)viewDidLoad { | |
[super viewDidLoad]; | |
NSString *htmlString = [self htmlFromBodyString:@"<p>Lorem Ipsum Dolor</p>" | |
textFont:[UIFont fontWithName:@"Arial" size:16.0] | |
textColor:[UIColor colorWithRed:0.208f green:0.208f blue:0.208f alpha:1.0f]]; | |
[self.newsHTMLContent loadHTMLString:htmlString baseURL:[NSURL URLWithString:@"https://cucume.lo/"]]; | |
} |