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
| xterm*reverveVideo: false | |
| xterm*selectToClipboard: true | |
| xterm*saveLines: 4096 | |
| xterm*faceName: BitstreamVeraSansMono Nerd Font | |
| xterm*faceSize: 11 | |
| xterm*vt100*geometry: 80x30 | |
| xterm*termName: xterm-color | |
| xterm*eightBitInput: false | |
| xterm*VT100.Translations: #override \ |
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
| import time | |
| import numpy as np | |
| def timer(f, param): | |
| start = time.time() | |
| r = False | |
| for i in range(1000): | |
| r = f(param) | |
| return (time.time() - start) / 1000 if r is not False else -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
| alias push-graph='rsync -avm --delete --progress ~/<LOCAL_DIR>/* <USER>@<SERVER_IP_ADDRESS>:/var/www/html/' |
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 | |
| /** | |
| * Class CSVDownload | |
| */ | |
| class CSVDownload { | |
| /** | |
| * @var array | |
| */ |
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 secret() { | |
| </dev/urandom tr -dc 'A-Za-z0-9!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' | head -c 32 ; echo | |
| } |
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
| set nocompatible | |
| filetype off " required | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#begin() | |
| let g:ycm_confirm_extra_conf = 0 | |
| Plugin 'VundleVim/Vundle.vim' | |
| Plugin 'fugitive.vim' |
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
| class Validator(): | |
| def __init__(self): | |
| self.valid = False | |
| self.validation_links = [] | |
| self.error_message = None | |
| def is_valid(self): | |
| return self.valid | |
| def set_valid(self, is_valid): |
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
| MaxMindDBEnable On | |
| MaxMindDBFile DB /opt/GeoIP/GeoLite2-Country.mmdb | |
| MaxMindDBEnv MM_COUNTRY_CODE DB/country/iso_code | |
| SetEnvIf MM_COUNTRY_CODE ^(AT|BE|BG|HR|CY|CZ|DK|EE|FI|FR|DE|GR|HU|IE|IT|LV|LT|LU|MT|NL|PL|PT|RO|SK|SI|ES|SE|GB|GI|AX|PM|GL|BL|SX|AW|CW|WF|PF|NC|TF|AI|BM|IO|VG|KY|FK|MS|PN|SH|GS|TC|IS|LI|NO|EU) BlockCountry | |
| Deny from env=BlockCountry |
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
| const path = require('path'); | |
| module.exports = { | |
| entry: './src/index.js', | |
| output: { | |
| filename: 'bundle.js', | |
| path: path.resolve(__dirname, 'dist') | |
| }, | |
| module: { | |
| rules: [ |
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
| # flatColourConvert image.png red | |
| function flatColourConvert() { | |
| magick convert "$1" -fill "$2" -colorize 100% x.png | |
| } | |
| # replaceColours "#1B3057" "#2B373D" | |
| # replaceColours red "#2B373D" 70% | |
| function replaceColours() { | |
| magick convert *.png -set filenam |