Skip to content

Instantly share code, notes, and snippets.

@kjkorea
kjkorea / phpstorm-auto-semicolon-macro.txt
Created August 28, 2020 07:52 — forked from umidjons/phpstorm-auto-semicolon-macro.txt
PhpStorm: Record Auto semicolon macro and bind shortcut to it
Record Auto semicolon macro and bind shortcut to it:
1. Edit -> Macros -> Start Macro Recording
2. In the editor go to the end of line by pressing End
3. put semicolon ';'
4. Edit -> Macros -> Stop Macro Recording
5. Give a name, for example 'Auto semicolon'
6. Open settings (Ctrl + Alt + s), select Keymap
7. Expand Macros node
8. Select 'Auto semicolon', in the context menu choose Add Keyboard Shortcut
9. Set Ctrl + ; as First keystroke
admin.addPeer("enode://78de8a0916848093c73790ead81d1928bec737d565119932b98c6b100d944b7a95e94f847f689fc723399d2e31129d182f7ef3863f2b4c820abbf3ab2722344d@191.235.84.50:30303");
admin.addPeer("enode://570b9996c04eca0d9b94b5fa911a0becc0d9764bca2a284d776df74077a7e4b5a355a5cbbf553fcbd790204a28002aa9d858f211a8109b13e2dcef070956f8dd@54.39.28.76:30303");
admin.addPeer("enode://1dc3dcbba882d910efb21ab65920d1d8d7b78c7ea99916f7318a6dc3b599cf1e9470e75f26fe036ef127f86eafc84842c0a9aa56c04a0d9fede2fc912bf51b20@3.8.146.75:30303");
admin.addPeer("enode://39df253834cbca314bc3234b9bd0916e19fd887bce4971ebe6fc1fd11f30a63c616dd4341fbd614728d68c32cba81bc0d56873a69ab18da98bcc42fdf65cd28f@47.186.78.207:30301");
admin.addPeer("enode://95176fe178be55d40aae49a5c11f21aa58968e13c681a6b1f571b2bb3e45927a7fb3888361bef85c0e28a52ea0e4afa17dcaa9d6c61baf504b3559f056f78581@163.172.145.241:30303");
admin.addPeer("enode://4c2b5c5d9503b7f4e76a551c827f19200f7f9ebb62f2cb5078c352de1e8d4d1006efa8fc143f9ccf2c8fd85836198dc1c69729dfa1c54d63f5d1d57fd8781bf8@
@kjkorea
kjkorea / vagrant-cheat-sheet.md
Created December 28, 2018 09:14 — forked from wpscholar/vagrant-cheat-sheet.md
Vagrant Cheat Sheet

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
@kjkorea
kjkorea / strPad.js
Created December 7, 2017 01:20 — forked from markshust/strPad.js
jquery str_pad
$.strPad = function(input, pad_length, pad_string, pad_type){
var output = input.toString();
if (pad_string === undefined) { pad_string = ' '; }
if (pad_type === undefined) { pad_type = 'STR_PAD_RIGHT'; }
if (pad_type == 'STR_PAD_RIGHT') {
while (output.length < pad_length) {
output = output + pad_string;
}
} else if (pad_type == 'STR_PAD_LEFT') {
while (output.length < pad_length) {
@kjkorea
kjkorea / str_pad.js
Created December 7, 2017 01:19 — forked from jawdatls/str_pad.js
Javascript strPad function
function str_pad(input, pad_length, pad_string, pad_type){
var output = input.toString();
if (pad_string === undefined) { pad_string = ' '; }
if (pad_type === undefined) { pad_type = 'STR_PAD_RIGHT'; }
if (pad_type == 'STR_PAD_RIGHT') {
while (output.length < pad_length) {
output = output + pad_string;
}
} else if (pad_type == 'STR_PAD_LEFT') {
while (output.length < pad_length) {
@kjkorea
kjkorea / _ide_helper.php
Created March 31, 2017 07:27 — forked from barryvdh/_ide_helper.php
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using https://github.com/barryvdh/laravel-ide-helper
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.4.11 on 2017-02-14.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
exit("This file should not be included, only analyzed by your IDE");