Skip to content

Instantly share code, notes, and snippets.

@datousir
datousir / Install_gcc7_ubuntu_16.04.md
Created February 14, 2019 05:41 — forked from jlblancoc/Install_gcc7_ubuntu_16.04.md
Installing gcc-7 & g++-7 in Ubuntu 16.04LTS Xenial

Run the following in the terminal:

Install the gcc-7 packages:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install g++-7 -y

Set it up so the symbolic links gcc, g++ point to the newer version:

@datousir
datousir / neovim.md
Created February 13, 2019 07:46 — forked from humorless/neovim.md
How to install neovim in Ubuntu-14.04 & using terminal mode

Install neovim in ubuntu 14.04

sudo add-apt-repository ppa:neovim-ppa/unstable 
sudo apt-get update
sudo apt-get install neovim

Using terminal mode

  1. Enter terminal mode
@datousir
datousir / msys2-setup.md
Created February 12, 2019 07:15 — forked from roblogic/msys2-setup.md
MSYS2 first time setup

MSYS2 is a minimalist linux/unix shell environment for Windows.

Quote: "A modern replacement for MSYS bringing recent versions of the GNU toolchains, Git and other common Unix command line tools to the Windows platform"

1. Install

Do all the steps listed here: http://msys2.github.io/
(troubleshooting guide here: https://github.com/msys2/msys2/wiki/MSYS2-installation )

2. Set up proxies

@datousir
datousir / aes_encryption.go
Created September 15, 2018 06:56 — forked from stupidbodo/aes_encryption.go
AES Encryption Example in Golang
// Playbook - http://play.golang.org/p/3wFl4lacjX
package main
import (
"bytes"
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/base64"
@datousir
datousir / gl-form.py
Created August 13, 2018 03:39 — forked from gpocentek/gl-form.py
python-gitlab login/password auth using cookies
import re
import sys
import requests
import gitlab
URL = 'https://gitlab.com'
SIGN_IN_URL = 'https://gitlab.com/users/sign_in'

Ranger Cheatsheet

General

Shortcut Description
ranger Start Ranger
Q Quit Ranger
R Reload current directory
? Ranger Manpages / Shortcuts
@datousir
datousir / instructions.md
Created August 2, 2017 06:33 — forked from pajtai/instructions.md
Debugging Node with Webstorm running on a remote server

Debugging node running on a remote server

Node uses a TCP interface for debugging, so if you can get a handle on the right port, you can debug apps running remotely. This means you can run through code on staging, Vagrant, etc. The following shows you how to start node with the debug flag and use an SSH tunnel to access the right port.

Things you need:

  • ssh access to the server
  • ability to restart node app with --debug flag or node-inspector installed on server

Debugging using Webstorm

@datousir
datousir / vort.html
Created July 25, 2017 14:36 — forked from doobeh/vort.html
DatePicker JS Example Flask
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>DatePicker Example</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<script>

tmux cheat sheet

Session Control (from the command line)

tmux            Start a new session
tmux attach     Re-attach a detached session
tmux attach -d  Re-attach a detached session (and detach it from elsewhere)

Pane Control

@datousir
datousir / tmux-cheatsheet.markdown
Created June 5, 2017 10:36 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname