Skip to content

Instantly share code, notes, and snippets.

View siancu's full-sized avatar

Stelian Iancu siancu

View GitHub Profile
@siancu
siancu / Plug.vim
Created December 21, 2020 16:26
Check for plug and install it if needed
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
@siancu
siancu / extensions.md
Last active June 2, 2020 08:45
Useful VS Code Extensions
  • Dingo : directly open any npm package source code in VS Code; optionally install all the dependencies.
@siancu
siancu / iss-example.py
Created January 7, 2020 12:09
Python examples
import requests
import sqlite3
import sys
import time
from collections import namedtuple
DB_LOCATION = 'ISS.db'
TABLE_CREATE_SQL = """
CREATE TABLE IF NOT EXISTS iss_position
@siancu
siancu / Open Marked.app from Emacs.el
Created January 15, 2013 22:30
Function to open Marked.app from Emacs showing the contents of the current Markdown file.
(defun markdown-preview-file ()
"run Marked on the current file and revert the buffer"
(interactive)
(shell-command
(format "open -a /Applications/Marked.app %s"
(shell-quote-argument (buffer-file-name))))
)
(global-set-key (kbd "C-c m") 'markdown-preview-file)