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
| * module.infra-production.module.jpmain-cloudsql-rr-ha.output.replica_instance_sql_ipv4s: Resource 'google_sql_database_instance.new_instance_sql_replica' does not have attribute 'ip_address.0.ip_address' for variable 'google_sql_database_instance.new_instance_sql_replica.*.ip_address.0.ip_address' |
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> | |
| ServerName something.app | |
| ProxyPreserveHost On | |
| ProxyRequests Off | |
| RequestHeader unset Accept-Encoding | |
| ProxyPass / http://localhost:8080/ | |
| ProxyPassReverse / http://localhost:8080/ | |
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
| // 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 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
| #!/bin/bash | |
| for gitdir in `find ./ -name .git`; | |
| do | |
| workdir=${gitdir%/*}; | |
| echo; | |
| reponame=$(basename $(git --git-dir=$gitdir remote show -n origin | grep Fetch | cut -d: -f2-)); | |
| echo $reponame; | |
| neworigin="git@[REPLACE_WITH_URL]/$reponame"; | |
| echo $neworigin; |
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
| // ========== PX to EM calculation | |
| // It strips the unit of measure and returns it | |
| @function strip-unit($num) { | |
| @return $num / ($num * 0 + 1); | |
| } | |
| // Converts "px" to "em" using the ($)em-base | |
| @function convert-to-em($value) { | |
| $value: strip-unit($value) / strip-unit($font-size) * 1em; | |
| @if ($value == 0em) { $value: 0; } // Turn 0em into 0 |
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
| // Fetch the Feed object | |
| $jobsXML = simplexml_load_file('https://tsb-applications.advorto.com/candidate/vacancyfeed.aspx'); | |
| // Cache it as a JSON object | |
| Cache::set('jobs', false, json_encode($jobsXML), false); | |
| // Fetch the cached object | |
| $jobs = Cache::get('jobs', false); |
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 | |
| use \Illuminate\Session\TokenMismatchException; | |
| class UserControllerTest extends BaseControllerTestCase { | |
| public function testShouldLogin() | |
| { | |
| $this->requestAction('GET', 'UserController@getLogin'); | |
| $this->assertRequestOk(); |
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
| $captcha = Loader::helper('validation/captcha'); | |
| echo $captcha->display(); | |
| echo $captcha->showInput(); | |
| if($captcha->check()){ | |
| // User passed, continue processing... | |
| } |
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
| $val = Loader::helper('validation/form'); | |
| $data = array( | |
| 'name' => 'Jane Doe', | |
| 'email' => '', | |
| 'website' => 'http://example.com', | |
| 'content' => 'Great Post!' | |
| ); | |
| $val->setData($data); |
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
| CREATE INDEX radians ON spaces USING gist (ll_to_earth(lng, lat)) |
NewerOlder