title: 'Example post' published_at: 'Marzec 23, 2019' layout: post categories: example post date: 2019-03-23 20:06:46 +0100 description: >- # this means to ignore newlines until "baseurl:" Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.
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
| # Aliases | |
| alias drc='docker-compose' | |
| alias dre='docker exec -it' | |
| # Functions | |
| drirm () { | |
| images=$(docker image ls -f "reference=$1*" -q) | |
| if [[ -z "$images" ]]; then | |
| echo "drirm: ❌ No images matching: \"$1*\"; Aborting." | |
| else |
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
| CREATE TABLE IF NOT EXISTS `country` ( | |
| `id` int(11) NOT NULL AUTO_INCREMENT, | |
| `iso` char(2) NOT NULL, | |
| `name` varchar(80) NOT NULL, | |
| `nicename` varchar(80) NOT NULL, | |
| `iso3` char(3) DEFAULT NULL, | |
| `numcode` smallint(6) DEFAULT NULL, | |
| `phonecode` int(5) NOT NULL, | |
| PRIMARY KEY (`id`) | |
| ) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
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
| DROP TABLE currency; | |
| -- Create table variable | |
| CREATE TABLE currency ( | |
| name VARCHAR(20), | |
| code VARCHAR(3), | |
| symbol VARCHAR(5) | |
| ); | |
| ALTER TABLE currency CONVERT TO CHARACTER SET utf8; |
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
| function accountNumberValidator(accountNumber, countryCode) { | |
| let copy = accountNumber.replace(/[^0-9]+/g, ''); | |
| const weights = [ | |
| 1, | |
| 10, | |
| 3, | |
| 30, | |
| 9, | |
| 90, | |
| 27, |
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
| Rails.logger.info('Start loading rake tasks') | |
| Rails.application.load_tasks | |
| Rails.logger.info('Rake tasks loaded') | |
| Rails.logger.info('Spawning jekyll') | |
| jekyll_pid = Process.fork do | |
| Process.setsid | |
| Rake::Task['jekyll:watch'].invoke | |
| end | |
| Rails.logger.info("Jekyll spawned at pid: #{jekyll_pid}") |
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
| # 1. Clear retry set | |
| Sidekiq::RetrySet.new.clear | |
| # 2. Clear scheduled jobs | |
| Sidekiq::ScheduledSet.new.clear | |
| # 3. Clear 'Processed' and 'Failed' jobs |