Skip to content

Instantly share code, notes, and snippets.

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

evandrocoan

💤
Sleeping...
View GitHub Profile
# Debug Linux Application.txt
# Copyright (c) 2019 Evandro Coan
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
@evandrocoan
evandrocoan / last_commit.py
Last active June 27, 2019 13:30 — forked from bitrut/last_commit.py
Get timestamp of the last commit in git repository
#!/usr/bin/python
import subprocess
import shlex
import re
from optparse import OptionParser
def git_version(repository_path):
commad = shlex.split( "git log -1 --pretty=format:%ci" )
p = subprocess.Popen(commad, stdout=subprocess.PIPE, cwd=repository_path)
@evandrocoan
evandrocoan / Makefile
Created April 28, 2017 15:04 — forked from prwhite/Makefile
Add a help target to a Makefile that will allow all targets to be self documenting
# Add the following 'help' target to your Makefile
# And add help text after each target name starting with '\#\#'
help: ## Show this help.
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
# Everything below is an example
target00: ## This message will show up when typing 'make help'
@echo does nothing
#!/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.
# Matching open parenthesis outside double or single quotes.md
# Copyright (c) 2019 Evandro Coan
# 
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
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

After creating the file ./_generic_installer.sh with the _generic_installer.sh snippet contents bellow, change/tweak it as you would like.

Then, you can run/use it like the following, i.e., by importing/sourcing it and calling its convenience functions.

You can see all confience functions by calling the help command. Just see the first usage example sample output.

  1. https://github.com/evandrocoan/MyLinuxSettings/blob/master/.local/bin/_generic_installer.sh

test.sh