$ brew update && brew install kubectl && brew cask install docker minikube virtualbox
$ brew cask reinstall minikube
$ minikube delete
$ rm -fr ~/.minikube/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::collections::HashMap; | |
fn main() { | |
let action = std::env::args().nth(1).expect("Please provide an action"); | |
let item = std::env::args().nth(2).expect("Please provide an item"); | |
let mut todo = Todo::new().expect("Initialisation of db failed"); | |
if action == "add" { | |
todo.insert(item); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import wifi | |
def Search(): | |
wifilist = [] | |
cells = wifi.Cell.all('wlan0') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"final_space": true, | |
"console_title": true, | |
"console_title_style": "folder", | |
"blocks": [ | |
{ | |
"type": "prompt", | |
"alignment": "left", | |
"horizontal_offset": 0, | |
"vertical_offset": 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from itertools import accumulate | |
from bisect import bisect | |
from random import randrange | |
from unicodedata import name as unicode_name | |
# Set the unicode version. | |
# Your system may not support Unicode 7.0 charecters just yet! So hipster. | |
UNICODE_VERSION = 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Pexpect is a Python module for spawning child applications and controlling | |
them automatically. Pexpect can be used for automating interactive applications | |
such as ssh, ftp, passwd, telnet, etc. It can be used to a automate setup | |
scripts for duplicating software package installations on different servers. It | |
can be used for automated software testing. Pexpect is in the spirit of Don | |
Libes' Expect, but Pexpect is pure Python. Other Expect-like modules for Python | |
require TCL and Expect or require C extensions to be compiled. Pexpect does not | |
use C, Expect, or TCL extensions. It should work on any platform that supports | |
the standard Python pty module. The Pexpect interface focuses on ease of use so | |
that simple tasks are easy. |
-
install zbar on windows with include and library files
-
make sure mingw installed and bin directory added to the path
-
in PYTHONPATH\Lib\distutils, create a file distutils.cfg and add two lines:
[build]
compiler=mingw32
-
get
dll
lib
andinclude
file from ftp://sourceware.org/pub/pthreads-win32/dll-latest copy files toPATH_MINGW32/[lib,bin,include]
separately, just need file name likepthreadGC2
and remember to chang the name tolibpthread
-
change or add lines in
setup.py
:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
connection: paramiko | |
vars: | |
ansible_ssh_private_key_file: /path/to/private_key | |
ansible_ssh_pass: passphrase_for_private_key | |
tasks: | |
- debug: | |
msg: hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I tried to use the pip install wifi but it really didn't work. | |
# So created this | |
import subprocess | |
process = subprocess.Popen(['/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport','-I'], stdout=subprocess.PIPE) | |
out, err = process.communicate() | |
process.wait() | |
print(out) | |
''' |