Skip to content

Instantly share code, notes, and snippets.

@penn201500
penn201500 / create_robotframework_testcase_methods.md
Last active April 6, 2017 08:17 — forked from oiuww09fn/create_test_data.md
Robot Framework documentation

创建测试文件

1 测试文件语法

1.1 测试用例文件和目录的组织层次结构

  • 测试用例在测试用例文件中创建;
  • 一个测试用例文件自动的创建一个包含文件中所有测试用例的测试集;
@penn201500
penn201500 / tmux-cheatsheet.markdown
Created August 10, 2017 03:34 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@penn201500
penn201500 / gist:dad1045a660f8de1d051891f13a5318d
Created August 16, 2017 04:25
shell实现每个工作日定时执行指定任务
#!/bin/sh
#Section configuration(配置部分)
#Task Time ,example:203000(Time 20:30:00);190000(Time 19:00:00);
startTime=113200
#Section promgram (程序执行部分)
perDate=$(date "+%Y%m%d")
isNewDay=1
isFirstTime=1
@penn201500
penn201500 / nametuple_instead_of_class
Created August 29, 2017 09:54
nametuple_instead_of_class
# Why Python is Great: Namedtuples
# Using namedtuple is way shorter than
# defining a class manually:
>>> from collections import namedtuple
>>> Car = namedtup1e('Car', 'color mileage')
# Our new "Car" class works as expected:
>>> my_car = Car('red', 3812.4)
>>> my_car.color
'red'
@penn201500
penn201500 / python dict get method
Created August 29, 2017 10:10
python dict get method
# The get() method on dicts
# and its "default" argument
name_for_userid = {
382: "Alice",
590: "Bob",
951: "Dilbert",
}
def greeting(userid):
@penn201500
penn201500 / tmux.md
Created September 20, 2017 02:01 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@penn201500
penn201500 / netpps.sh
Created July 24, 2018 12:50 — forked from joemiller/netpps.sh
shell: quick linux scripts for showing network bandwidth or packets-per-second
#!/bin/bash
if [ -z "$1" ]; then
echo
echo usage: $0 network-interface
echo
echo e.g. $0 eth0
echo
echo shows packets-per-second
@penn201500
penn201500 / install-tmux.sh
Created April 15, 2019 05:28 — forked from pokev25/install-tmux.sh
Install tmux 2.8 on centos 7
# Install tmux 2.8 on Centos
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -LOk https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz
tar -xf libevent-2.1.8-stable.tar.gz
cd libevent-2.1.8-stable
./configure --prefix=/usr/local
@penn201500
penn201500 / install_packages.sh
Created May 10, 2019 16:15 — forked from luiscape/install_packages.sh
Install Python dependency packages from requirements.txt using conda.
#
# Original solution via StackOverflow:
# http://stackoverflow.com/questions/35802939/install-only-available-packages-using-conda-install-yes-file-requirements-t
#
#
# Install via `conda` directly.
# This will fail to install all
# dependencies. If one fails,
# all dependencies will fail to install.
@penn201500
penn201500 / emacs_hammerspoon.lua
Created May 18, 2019 17:11 — forked from justintanner/emacs_hammerspoon.lua
Emacs Hammerspoon Script
--- Emacs Hammerspoon Script
-- Author: Justin Tanner
-- Email: work@jwtanner.com
-- License: MIT
--- What does this thing do?
-- Allows you to have Emacs *like* keybindings in apps other than Emacs.
-- You can use Ctrl-Space to mark and cut text just like Emacs. Also enables Emacs prefix keys such as Ctrl-xs (save).
--- Installation