🏋️♂️
This file contains 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
zend_extension=xdebug.so | |
xdebug.default_enable = On | |
xdebug.profiler_enable = On | |
xdebug.profiler_output_dir = "/tmp/xdebug" | |
xdebug.profiler_append = On | |
xdebug.profiler_enable_trigger = On | |
xdebug.profiler_output_name = "%u_%p.profile.xlog" |
This file contains 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 a branch | |
cd master/ | |
git branch branch_name | |
git checkout branch_name | |
git push origin branch_name | |
# Create and switch to a new branch | |
cd master/ | |
git checkout -b branch_name | |
git push origin branch_name |
This file contains 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 a | |
JOIN TABLEB b ON a.join_colA = b.join_colB | |
SET a.columnToUpdate = [something] |
This file contains 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 | |
# Copy this file on /usr/loca/bin/xdebug and test your PHP configuration with "xdebug -i | grep -i xdebug" | |
XDEBUG_CONFIG="idekey=PHPSTORM" php \ | |
-dxdebug.remote_host=`echo $SSH_CLIENT | cut -d "=" -f 2 | awk '{print $1}'` \ | |
-dxdebug.remote_enable=On \ | |
-dxdebug.remote_connect_back=On \ | |
-dxdebug.remote_port=9000 \ | |
"$@" |
This file contains 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
/** | |
* Once this is running open your browser and hit http://localhost | |
* You'll see that the request hits the proxy and you get the HTML back | |
*/ | |
'use strict'; | |
const net = require('net'); | |
const http = require('http'); |
This file contains 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
sudo apt install alien -y | |
sudo alien --scripts bluejeans_1.28.9-2_amd64.rpm # or whatever is the file you downloaded from the bluejeans website | |
sudo dpkg -i bluejeans_1.28.9-2_amd64.deb | |
cd /lib/x86_64-linux-gnu | |
sudo ln -s libudev.so libudev.so.0 | |
# now you can launch bluejeans | |
/opt/bluejeans/bluejeans-bin |
This file contains 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
'atom-text-editor': | |
'ctrl-d': 'editor:delete-line' | |
'ctrl-y': 'editor:duplicate-lines' | |
'ctrl-w': 'core:close' |
This file contains 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
package main | |
// Here's a simple example to show how to properly terminate multiple go routines by using a context. | |
// Thanks to the WaitGroup we'll be able to end all go routines gracefully before the main function ends. | |
import ( | |
"context" | |
"fmt" | |
"math/rand" | |
"os" |
This file contains 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
package main | |
import ( | |
"sync" | |
"fmt" | |
"time" | |
) | |
func main() { | |
lock := sync.Mutex{} |
This file contains 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 flattenArray = input => { | |
if (!Array.isArray(input)) { | |
throw new Error("Input must be an array") | |
} | |
let result = [] | |
for (let element of input) { | |
if (Array.isArray(element)) { | |
result = result.concat(flattenArray(element)) | |
} else { |