- Comment
- Single line comment: //
- Multiline comment /* */
- Combining multiple initialization is better as JS Engine would be faster at executing a single statement
var first = 10,
second = 15,
third = "third";| ; ~/.config/redshift.conf | |
| ; Global settings | |
| [redshift] | |
| temp-day=6500K | |
| temp-night=5000 | |
| transition=0 | |
| ;gamma=0.8:0.7:0.8 | |
| gamma=1.000:1.000:1.000 | |
| location-provider=manual | |
| adjustment-method=vidmode |
| # ~/.config/liquidpromptrc | |
| #################################### | |
| # LIQUID PROMPT CONFIGURATION FILE # | |
| #################################### | |
| # If you want to use different themes and features, | |
| # you can load the corresponding files here: | |
| #source ~/.config/liquidprompt/nojhan.theme | |
| #LP_PS1_FILE="~/.config/liquidprompt/nojhan.ps1" |
| # /etc/sysctl.d/99-shoaibi.conf | |
| fs.file-max = 2097152 | |
| fs.inotify.max_user_watches = 524288 | |
| kernel.hung_task_panic = 1 | |
| kernel.hung_task_timeout_secs = 300 | |
| kernel.msgmax = 65536 | |
| kernel.msgmnb = 65536 | |
| kernel.panic = 5 | |
| kernel.panic_on_oops = 1 | |
| kernel.pid_max = 65536 |
| [xyne-any] | |
| SigLevel = PackageRequired | |
| Server = http://xyne.archlinux.ca/repos/xyne | |
| [repo-ck] | |
| SigLevel = Never | |
| Server = http://repo-ck.com/$arch | |
| [atlassian] |
| #!/bin/bash | |
| # At the start of my DevOps career I used to mess up /etc permissions | |
| # a lot so I ended up creating 2 set of scripts that would be generated | |
| # on nightly bases using cron and then when required I'd just execute | |
| # these scripts | |
| find /etc -exec stat --format "chmod %a %n" {} \; > /root/restoreperms.sh | |
| find /etc -exec stat --format 'chown %U:%G %n' {} \; > /root/restoreowners.sh |
| ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub |
| Framework of choice: yii2. | |
| Configure application log to log all exceptions. | |
| Configure FileCache(just to have something to later replace, say, by Redis) | |
| 2 apps using same configs, same code: frontend, api. | |
| Api application would have a module called v1. | |
| Url pattern: http://app.com/ , http://api.app.com/v1/tradeMessages/consume | |
| Trends: | |
| - Most active user |
| <?php | |
| class GoogleMapsGeocoder extends CApplicationComponent | |
| { | |
| /** | |
| * @var string | |
| */ | |
| const ENDPOINT_URL = 'http://maps.googleapis.com/maps/api/geocode/json?address=%s'; | |
| /** |