WSL:
- Install openssh-server:
sudo apt install openssh-server
- Add or uncomment following lines in
/etc/ssh/sshd_config
:
WSL:
sudo apt install openssh-server
/etc/ssh/sshd_config
:Note: This gist may be outdated, thanks to all contributors in comments.
adb
is the Android CLI tool with which you can interact with your android device, from your PC
You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.
Don't hesitate to read comments, there is useful tips, thanks guys for this !
*.gpg filter=gpg diff=gpg | |
*.asc filter=gpg diff=gpg |
#!/bin/bash | |
# WARNING: This creates and manipulates clear text copies of the | |
# encrypted files. It tries to clean up afterwards, but lots can go | |
# wrong. If you are seriously worried about the secrecy of the files, | |
# don't trust this! | |
ANCESTOR=$1 | |
MINE=$2 | |
OTHER=$3 |
;; Based on http://stackoverflow.com/questions/28309340/managing-emacs-man-buffer-location/28311686 | |
(defun enable-window-reuse-for-modes (&rest modes) | |
"Enables window reuse for given modes - for any of modes specified, | |
in case there already exist window of given mode, new incarnation will reuse them. | |
Examples: | |
(require 'my-window-reuse) |
organization := "org.foo.bar" | |
name := "JustAnExample" | |
version := "1.0" | |
scalaVersion := "2.10.3" | |
scalacOptions := Seq("-unchecked", "-deprecation", "-encoding", "utf8") |
# -*- coding: utf-8 -*- | |
''' | |
Created on 2014-04-05 | |
@author: Sergey Prokhorov <me@seriyps.ru> | |
''' | |
import re | |
import operator | |
import decimal |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!