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
| // set build output directory with date and soft link dis folder to the latest build date | |
| date=$(date +%Y%m%d%H%M%S) && astro build --outDir build/$date && ln -sfn build/$date dist |
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
| "vim.normalModeKeyBindingsNonRecursive": [ | |
| { | |
| "before": [ | |
| "J" | |
| ], | |
| "after": [ | |
| "5", | |
| "j" | |
| ] | |
| }, |
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
| // ~/.profile | |
| export PATH="$HOME/.composer/vendor/bin:$PATH" | |
| // ~/.zprofile || ~/.bash_profile | |
| source ~/.profile |
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
| $mailhog = new \GuzzleHttp\Client([ | |
| 'base_uri' => 'http://127.0.0.1:8025' | |
| ]); | |
| $emails = json_decode( | |
| $mailhog | |
| ->get('/api/v1/messages') | |
| ->getBody() | |
| ->getContents() |
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
| local function keyCode(key) | |
| return function() hs.eventtap.keyStroke({}, key) end | |
| end | |
| hs.hotkey.bind({"ctrl"}, 'h', keyCode('left'), nil, keyCode('left')) | |
| hs.hotkey.bind({"ctrl"}, 'j', keyCode('down'), nil, keyCode('down')) | |
| hs.hotkey.bind({"ctrl"}, 'k', keyCode('up'), nil, keyCode('up')) | |
| hs.hotkey.bind({"ctrl"}, 'l', keyCode('right'), nil, keyCode('right')) |
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
| const targets = document.getElementsByClassName('smoothScroll'); | |
| const scrollToElement = function(event) { | |
| event.preventDefault(); | |
| let elementId = event.target.attributes.href.value.replace('#', ''); | |
| let scrollPosition = document.getElementById(elementId).offsetTop; |
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
| if (env('APP_ENV') === 'local') { | |
| \DB::connection()->enableQueryLog(); | |
| \Event::listen('kernel.handled', function ($request, $response) { | |
| if ( $request->has('sql-debug') ) { | |
| $queries = \DB::getQueryLog(); | |
| dd($queries); | |
| } | |
| }); | |
| } |
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 | |
| $supportedLangs = array('en-GB', 'fr', 'de'); | |
| $languages = explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']); | |
| foreach($languages as $lang) | |
| { | |
| if(in_array($lang, $supportedLangs)) | |
| { |
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 | |
| tableA | |
| SET | |
| columnA = SUB.columnB | |
| FROM | |
| ( select id, columnB FROM tableA ) as SUB | |
| WHERE | |
| tableA.id = SUB.id; |
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
| #301 Redirects for .htaccess | |
| #Redirect a single page: | |
| Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
| #Redirect an entire site: | |
| Redirect 301 / http://www.domain.com/ | |
| #Redirect an entire site to a sub folder | |
| Redirect 301 / http://www.domain.com/subfolder/ |
NewerOlder