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 | |
# Check if an argument was provided | |
if [ $# -eq 0 ]; then | |
echo "No file path provided." | |
exit 1 | |
fi | |
# Use the provided argument (file path) | |
file="$1" |
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
// Zed settings | |
// | |
// For information on how to configure Zed, see the Zed | |
// documentation: https://zed.dev/docs/configuring-zed | |
// | |
// To see all of Zed's default settings without changing your | |
// custom settings, run the `open default settings` command | |
// from the command palette or from `Zed` application menu. | |
{ | |
"base_keymap": "VSCode", |
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 | |
newUser='testuser' | |
newDbPassword='testpwd' | |
newDb='testdb' | |
host=localhost | |
#host='%' | |
# MySQL 5.7 and earlier versions | |
#commands="CREATE DATABASE \`${newDb}\`;CREATE USER '${newUser}'@'${host}' IDENTIFIED BY '${newDbPassword}';GRANT USAGE ON *.* TO '${newUser}'@'${host}' IDENTIFIED BY '${newDbPassword}';GRANT ALL privileges ON \`${newDb}\`.* |
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
let mapleader = "," | |
set scrolloff=5 | |
set incsearch | |
map Q gq | |
set rnu | |
set showmode | |
set clipboard+=unnamed | |
set ideastrictmode |
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
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
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
{ | |
"languageserver": { | |
"intelephense": { | |
"command": "intelephense", | |
"args": ["--stdio"], | |
"filetypes": ["php"], | |
"initializationOptions": { | |
"storagePath": "/tmp/intelephense" | |
} | |
}, |
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 | |
array=('{ | |
"product_id": "", | |
"name": "Private Austria (20.00%)", | |
"description": "Private Austria (20.00%)", | |
"billing_cycles": [ | |
{ | |
"frequency": { | |
"interval_unit": "MONTH", |
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 | |
d=2019-04-01 | |
while [ "$d" != 2019-08-04 ]; do | |
echo $d | |
php artisan export:adverts:fetch:leads --date="$d" | |
d=$(date -I -d "$d + 1 day") | |
done |
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
%s/\(\w\)\(\w*\)/\U\1\L\2/g #capitalize words |
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
0xe295cFcd1666800726B4ed8ffF59F32e814b7bE9 |
NewerOlder