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
| http://stackoverflow.com/questions/19386962/laravel-eloquent-and-complex-relationships?rq=1 | |
| http://forumsarchive.laravel.io/viewtopic.php?pid=21255 | |
| http://stackoverflow.com/questions/20666490/laravel-4-mssql-stored-procedure-with-parameters-as-a-prepared-statements | |
| http://culttt.com/2013/08/05/extending-eloquent-in-laravel-4/ | |
| http://www.blogosfera.co.uk/2013/08/pass-parameters-in-insert-query-stored-procedure-in-laravel-4/ |
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
| Remove index.php from the url | |
| http://stackoverflow.com/questions/10474740/how-to-remove-index-php-from-urls | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteBase / | |
| RewriteRule ^index\.php$ - [L] | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d |
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 | |
| # Unload kernel module , replace rtl8821ae with your device module. | |
| modprobe -r rtl8821ae | |
| #reload kernel module | |
| modprobe rtl8821ae | |
| # set wireless interface to down , replace wlp3s0 with your wifi device name | |
| ip link set wlp3s0 down | |
| #restart wpa_supplicant | |
| systemctl reenable wpa_supplicant |
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
| [Unit] | |
| Description=Restart WiFi on Resume | |
| After=suspend.target | |
| [Service] | |
| Type=oneshot | |
| RemainAfterExit=no | |
| ExecStart=/usr/bin/modprobe -r rtl8821ae | |
| ExecStart=/usr/bin/modprobe rtl8821ae | |
| ExecStart=/usr/bin/ifconfig wlp3s0 down |
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 | |
| // Ref : http://php.net/manual/en/function.ftp-put.php | |
| $name = "test.txt"; | |
| $filename = "/home/mine/Desktop/test.txt"; | |
| //-- Code to Transfer File on Server Dt: 06-03-2008 by Aditya Bhatt --// | |
| //-- Connection Settings | |
| $ftp_server = "server_url_here"; // Address of FTP server. | |
| $ftp_user_name = "username_here"; // Username |
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 | |
| /** | |
| * This snippet implements the logic behing https://github.com/philipbrown/signplz , simply to explain the functionality of generating the auth signature | |
| * for non-php programmers so that they can authenticate with the API without a problem. | |
| **/ | |
| $api_key = "key"; | |
| $api_sec = "sec"; | |
| $url = "http://abc.com/api/test"; |
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 | |
| $status = 'Image successfully uploaded!'; | |
| ?> |
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 | |
| class TestCase extends Illuminate\Foundation\Testing\TestCase { | |
| /** | |
| * Creates the application. | |
| * | |
| * @return Symfony\Component\HttpKernel\HttpKernelInterface | |
| */ | |
| public function createApplication() |
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
| So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear! | |
| Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy. | |
| * Off the top of my head * | |
| 1. Fork their repo on Github | |
| 2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it | |
| git remote add my-fork git@github...my-fork.git |
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
| gayan@gayan-laptop:~/Workspace/personal$ git clone -b develop https://github.com/laravel/laravel.git | |
| Cloning into 'laravel'... | |
| remote: Reusing existing pack: 21846, done. | |
| remote: Total 21846 (delta 0), reused 0 (delta 0) | |
| Receiving objects: 100% (21846/21846), 8.50 MiB | 116.00 KiB/s, done. | |
| Resolving deltas: 100% (10882/10882), done. | |
| Checking connectivity... done. | |
| gayan@gayan-laptop:~/Workspace/personal$ clear | |
| gayan@gayan-laptop:~/Workspace/personal$ ls | |
| git-test laravel last-min.-shopping magelk-charity taskrapp |