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
export PATH="$PATH:/Users/eg/development/flutter/bin" | |
export ANDROID_HOME="/Users/eg/development/Android/sdk" | |
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools/bin | |
### aliases | |
alias npm_ra="cd android && ./gradlew clean && cd .. && react-native run-android" | |
alias flush_dns="sudo killall -HUP mDNSResponder;sudo killall mDNSResponderHelper;sudo dscacheutil -flushcache" | |
alias npm_rbr="cd android && ./gradlew clean && ./gradlew bundleRelease && ./gradlew assembleRelease && cd .." | |
alias ard_up_em="/Users/eg/development/Android/sdk/tools/emulator -writable-system -netdelay none -netspeed full -avd \"Pixel_3_API_26_Oreo_8_\"" |
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
@echo off | |
REM cd "D:\xampp" | |
REM start "xampp-control.exe" | |
cd "C:\Program Files\HeidiSQL" | |
start heidisql.exe | |
cd "C:\Program Files\Sublime Text 3" | |
start sublime_text.exe |
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
/// dumps object (mostly used while debugging) | |
void dump(dynamic object,{bool printIt: true, String key, dynamic context}) { | |
if (!printIt) { | |
return; | |
} | |
String str = key != null ? key + ': ' : ''; | |
if (!(object is String)) { | |
String strObject = ''; |
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 | |
function maskString($str) | |
{ | |
$result = ''; | |
$parts = explode(' ', $str); | |
foreach ($parts as $part) { | |
if (!empty($part)) { | |
if (strlen($part) == 1) { |
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
printf "Memory\t\tDisk\t\tCPU\n" | |
MEMORY=$(free -m | awk 'NR==2{printf "%.2f%%\t\t", $3*100/$2 }') | |
DISK=$(df -h | awk '$NF=="/"{printf "%s\t\t", $5}') | |
CPU=$(top -bn1 | grep load | awk '{printf "%.2f%%\t\t\n", $(NF-2)}') | |
echo "$MEMORY\t$DISK\t$CPU" |
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
This is just a description of how to use Slack Message Tool, | |
You can backup and delete all the Slack messages at once with this easy app. Just choose what to do and our amazing magic will do that job for you. | |
https://www.messagebender.com/ |
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
[program:laravel-worker] | |
process_name=%(program_name)s_%(process_num)02d | |
command=/usr/bin/php ../artisan queue:work redis --sleep=3 --tries=3 | |
directory=/var/www/projects/project1/web/public/ | |
autostart=true | |
autorestart=true | |
user=www-data | |
numprocs=8 | |
redirect_stderr=true | |
stdout_logfile=/var/www/projects/project1/web/worker.log |
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
RewriteEngine On | |
# If we receive a forwarded http request from a proxy... | |
RewriteCond %{HTTP:X-Forwarded-Proto} =http [OR] | |
# ...or just a plain old http request directly from the client | |
RewriteCond %{HTTP:X-Forwarded-Proto} ="" | |
RewriteCond %{HTTPS} !=on | |
# Redirect to https version |
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 | |
namespace App\Models\Campaign; | |
use Illuminate\Database\Eloquent\Model; | |
use App\Classes\Traits\SetModelConnectionToSlave; | |
class CampaignDiscount extends Model | |
{ | |
use SetModelConnectionToSlave { |
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
/* FIX: Placeholder width cuts off text */ | |
.select2-container--default .select2-search--inline .select2-search__field { | |
width: initial !important; | |
} |
NewerOlder