Skip to content

Instantly share code, notes, and snippets.

View alexsoft's full-sized avatar

Alex Plekhanov alexsoft

View GitHub Profile
@alexsoft
alexsoft / remove-all-docker-containers.sh
Created December 1, 2021 23:54
Remove all docker containers
docker ps -aq | xargs docker container rm
@alexsoft
alexsoft / gist:3a77ecab725f1b123f6cfbe30b510ebe
Created September 10, 2019 12:01 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@alexsoft
alexsoft / .php_cs.laravel.php
Created July 17, 2019 14:41 — forked from laravel-shift/.php-cs-fixer.php
PHP CS Fixer - Laravel Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'phpdoc_indent' => true,
'binary_operator_spaces' => [
'operators' => ['=>' => null]
],

Keybase proof

I hereby claim:

  • I am alexsoft on github.
  • I am alexplekhanov (https://keybase.io/alexplekhanov) on keybase.
  • I have a public key ASCav97IiC4u0oDXde5AO8lYoFgUE1hNytrea7HPHbEW7Qo

To claim this, I am signing this object:

@alexsoft
alexsoft / gist:bbd711b5decbfadd71658c32df74d2e3
Created August 22, 2016 10:28
Generate SRI hash for script and/or link html tag
cat FILENAME.js | openssl dgst -sha384 -binary | openssl enc -base64 -A
@alexsoft
alexsoft / task.js
Last active August 29, 2015 14:25
Limit-Offset-Task
function range(r,a,o){var n,t,e,N=[],i=o||1,s=!1;if(isNaN(r)||isNaN(a)?isNaN(r)&&isNaN(a)?(s=!0,n=r.charCodeAt(0),t=a.charCodeAt(0)):(n=isNaN(r)?0:r,t=isNaN(a)?0:a):(n=r,t=a),e=n>t?!1:!0)for(;t>=n;)N.push(s?String.fromCharCode(n):n),n+=i;else for(;n>=t;)N.push(s?String.fromCharCode(n):n),n-=i;return N}function getItems(r,a){return a>=count?[]:r+a>count?range(a+1,count):range(a+1,a+r)}var count=Math.floor(15e3*Math.random());
// getItems(limit, offset) {...}
// limit = 1000 optimal
var result = [];
console.log(result);
@servers(['prod' => 'user@example.com', 'dev' => 'user@dev.example.com'])
@task('deploy', ['on' => $server])
cd /project/folder
git pull
php artisan cache:clear
@endtask
In task body you can write any commands for your deploy
and then deploy using just
@alexsoft
alexsoft / gist:9051027
Created February 17, 2014 13:58
ssh alias
Host srv1
User root
Port 225
HostName 8.8.8.8
@alexsoft
alexsoft / Google Chrome
Last active December 28, 2015 13:09
shell: installers of useful things (Ubuntu 12.04)
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install google-chrome-stable
@alexsoft
alexsoft / Preferences.sublime-settings
Last active January 21, 2018 11:29
JSON: Sublime_3_Settings
{
"always_prompt_for_file_reload": false,
"always_show_minimap_viewport": false,
"animation_enabled": true,
"atomic_save": true,
"auto_close_tags": true,
"auto_complete": true,
"auto_complete_commit_on_tab": false,
"auto_complete_delay": 50,
"auto_complete_selector": "source - comment, meta.tag - punctuation.definition.tag.begin",