Skip to content

Instantly share code, notes, and snippets.

View evandrocoan's full-sized avatar
💤
Sleeping...

evandrocoan

💤
Sleeping...
View GitHub Profile
#!/bin/bash
outversions="
Things 17.16 I am not 12.23.1 interested
36.35.17
35.34.16
24.23.5
19.18
3.
import sublime
import sublime_plugin

class MaxPaneEvents(sublime_plugin.EventListener):

    def on_selection_modified(self, view):
        print( 'I am on_selection_modified...', view.id() )
```sh
#!/bin/bash
val1=`vmstat -f 1 | cut -d 'f' -f1 | tr -d " \t\n\r"`
while true
do
val2=`vmstat -f 1 | cut -d 'f' -f1 | tr -d " \t\n\r"`
result=$(($val2 - $val1))
echo $result new forks
@evandrocoan
evandrocoan / mmap_python_usage.md
Last active July 25, 2023 08:47
Example of shared memory usage in python using mmap!
import mmap
import time
import sys
import json

# https://docs.python.org/3.9/library/mmap.html
# https://blog.askesis.pl/post/2019/02/mmap.html
memory = mmap.mmap( -1, 20, access=mmap.ACCESS_WRITE )
```python
@classmethod
def is_applicable(cls, settings):
try:
view = inspect.currentframe().f_back.f_locals['view']
```
https://github.com/SublimeText/LaTeXTools/blob/5bbec63a11e44feb1ff550a16c486fef68a3eaac/st_preview/preview_math.py#L531

Heroku Docker Tutorial (for dummies)

Using single application per git repository

  1. Create a Dockerfile on the root of your project. For example, this Dockerfile-myaplication:
    FROM evandrocoan/ubuntu18nodejspython:latest

Replacing backticks `word` with **`word`**

  1. Create a buffer only with `git`
  2. Press Ctrl+H to open Find and Replace
  3. Set Find to (?<!\*)`([^\n*`]+?)`(?!\*)
  4. Set Replace to **`\1`**
  1. Find to ((?:[^*]))`([^\n*`]+?)`(?!\*)
  2. Replace to \1**`\2`**