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
| $data = array_map(function($v) { | |
| return str_getcsv($v, ";"); | |
| }, file($file)); |
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
| ./ngrok http 192.168.10.10:80 --host-header=SITE |
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 DB; | |
| DB::unprepared(file_get_contents(storage_path('file.sql'))); |
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
| var allowPaste = function(e){ | |
| e.stopImmediatePropagation(); | |
| return true; | |
| }; | |
| document.addEventListener('paste', allowPaste, true); |
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
| "require": { | |
| "my/package": "dev-master", | |
| }, | |
| "repositories": [ | |
| { | |
| "type": "path", | |
| "url": "../packages/my/package", | |
| "options": { | |
| "symlink": true | |
| } |
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
| # Via https://stackoverflow.com/questions/215718/reset-or-revert-a-specific-file-to-a-specific-revision-using-git | |
| git checkout c5f567 -- file1/to/restore file2/to/restore | |
| # ~1 denotes commits before hash | |
| git checkout c5f567~1 -- file1/to/restore file2/to/restore |
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/python | |
| # 8th November, 2009 | |
| # update manager failed, giving me the error: | |
| # 'files list file for package 'xxx' is missing final newline' for every package. | |
| # some Googling revealed that this problem was due to corrupt files(s) in /var/lib/dpkg/info/ | |
| # looping though those files revealed that some did not have a final new line | |
| # this script will resolve that problem by appending a newline to all files that are missing it | |
| # NOTE: you will need to run this script as root, e.g. sudo python newline_fixer.py |
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
| #Update package lists | |
| sudo apt-get update | |
| #Fetch language pack | |
| sudo apt-get install language-pack-sv | |
| #Check available languages, sv_SE.utf8 | |
| locale -a | |
| #Generate locale |
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
| defaults write com.apple.dock size-immutable -bool true; killall Dock |
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
| # BROWSER CACHE | |
| location ~* ^.+\.(?:css|cur|js|jpe?g|gif|htc|ico|png|xml|otf|ttf|eot|woff|woff2|svg|ico)$ { | |
| expires 365d; | |
| } |