[[Goto function definition starting from cursor position'',`'Return to previous cursor position{Go back to previous linegap,}go to next linegapdggRemove from current position to begining of filedGRemove from current to end of file#,*search and highlight the word under current cursor in the whole file.mato set mark at position a,'ato go to line at mark a, or`ato go to exact column at agdto go to local variable initialisation. (gd = Goto Declaration)
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
| -- Logs begin at Tue 2018-08-14 23:41:29 IST, end at Sat 2018-10-27 04:53:26 IST. -- | |
| Oct 27 00:51:23 server systemd[1]: Started Kubernetes Kubelet Server. | |
| Oct 27 00:51:23 server kubelet[1495]: Flag --address has been deprecated, This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/adminis> | |
| Oct 27 00:51:23 server kubelet[1495]: Flag --allow-privileged has been deprecated, will be removed in a future version | |
| Oct 27 00:51:23 server kubelet[1495]: Flag --cgroup-driver has been deprecated, This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/a> | |
| Oct 27 00:51:23 server kubelet[1495]: Flag --fail-swap-on has been deprecated, This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/ad> | |
| Oct 27 00:51:23 server kubelet[1495]: Usage: | |
| Oct 27 00:51:23 server kubelet[1495]: kubelet [flags] | |
| Oct 27 00:51:23 |
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 createSlug($title = null, $id = 0) | |
| { | |
| $maxTries = 10; // Max recursion limit | |
| if(!$title) { | |
| throw new \Exception('Please mention title to generate the slug'); | |
| } | |
| // Normalize the title | |
| $slug = str_slug($title); |
This is a reminder guide for me to how and what to know about the weird things in JS. Get to basics first.
-
What are Event loops in Javascript? Refs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop https://www.youtube.com/watch?v=8aGhZQkoFbQ
-
What will be output of this:
console.log(1)
setTimeout(function(){ console.log(2) })
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
| FROM ruby:2.1 | |
| MAINTAINER graham@grahamc.com | |
| RUN rm -rf site/Gemfile.lock | |
| RUN apt-get update \ | |
| && apt-get install -y \ | |
| node \ | |
| python-pygments \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/ |
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. issue this command: sudo ./certbot-auto certonly --manual -d example.com |
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. What are closures. When and why to use closures? | |
| 2. Search stackoverflow.com for wikis/contributions on recent JS topics such as ES6, Arrays etc. | |
| https://stackoverflow.com/questions/tagged/ecmascript-6 | |
| https://stackoverflow.com/questions/tagged/javascript | |
| https://stackoverflow.com/questions/tagged/vue.js | |
| https://stackoverflow.com/questions/948358/adding-custom-functions-into-array-prototype#comment15037097_948379 | |
| JS Falsey values: https://stackoverflow.com/a/4686608/1136491 | |
| 3. must know basic concepts. Go through "you-don't-know-JS" | |
| 4. Learn to setup webpack / gulp+babel+browseify. | |
| 5. Start learning Mocha/Karma/Nightowl test runners. Should know E2E, Unit and Integration testing |
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
| # For Invoices: | |
| PHP Ninja |
- Create Desktop entry
cat > ~/.local/share/applications/Robo3t.desktop <<EOL
[Desktop Entry]
Encoding=UTF-8
Name=Robot3t
Exec=mongov
Icon=/opt/robo3t-1.1.1-linux-x86_64-c93c6b0/icon.png
Terminal=false
Type=ApplicationThis assumes we have following schema:
- Schema for Messages:
mongoose.Schema({
user: String,
content: String,
creation_time: Date,
to: String,
chat: mongoose.Schema.Types.ObjectId,
read: Boolean