Skip to content

Instantly share code, notes, and snippets.

@welshstew
welshstew / sublime-install.sh
Created December 9, 2016 21:10
sublime text 3 install
#!/bin/sh
SHORTCUT="[Desktop Entry]
Name=Sublime Text 3
Comment=Edit text files
Exec=/usr/local/sublime-text-3/sublime_text
Icon=/usr/local/sublime-text-3/Icon/128x128/sublime_text.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Utility;TextEditor;"
@ZhouMeichen
ZhouMeichen / 开源自动化测试框架.md
Last active November 5, 2017 09:27
整理熟悉的测试框架(Selenium、Watir、Watir WebDriver)

开源自动化测试框架

自动化测试工具有很多,包括开源的和商业的,以下介绍目前比较流行的开源自动化测试工具。

1. Selenium

Selenium是一个用于Web应用程序自动化测试的开源测试框架。Selenium是个庞大的家族,包含Selenium IDE、Selenium Server、Selenium Core、Selenium WebDriver、Selenium RC(Remote Control)、Selenium Grid、Selenium on Rails等。

Selenium 1.0(RC)

简介

@xmeng1
xmeng1 / gitkraken-install.sh
Last active June 21, 2018 11:48 — forked from seangtkelley/gitkraken-install.sh
Install Script for Gitkraken on Fedora 27 + Launcher Icon
#!/bin/bash
# Enter /opt folder (common folder for user installed programs)
# This script assumes you have proper permissions on /opt
cd /home/mengxin/Applications
# Download GitKraken
wget https://release.gitkraken.com/linux/gitkraken-amd64.tar.gz
# Extract the Kraken into /opt directory
@nuxwin
nuxwin / gnome-tracker-disable.md
Created April 5, 2018 14:32 — forked from vancluever/gnome-tracker-disable.md
GNOME Tracker Disable

Disabling GNOME Tracker and Other Info

GNOME's tracker is a CPU and privacy hog. There's a pretty good case as to why it's neither useful nor necessary here: http://lduros.net/posts/tracker-sucks-thanks-tracker/

After discovering it chowing 2 cores, I decided to go about disabling it.

Directories

@leandrocp
leandrocp / Brocfile
Created November 6, 2014 01:36
Deploy ember-cli app on nginx
/* global require, module */
// Prepend app name on assets names
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp({
fingerprint: {
enabled: true,
prepend: '/appX/'
@xmeng1
xmeng1 / TypeClassDemo.scala
Created June 18, 2019 05:02
Cats Type Class Demo
// Define a very simple JSON AST
sealed trait Json
final case class JsObject(get: Map[String, Json]) extends Json
final case class JsString(get: String) extends Json
final case class JsNumber(get: Double) extends Json
case object JsNull extends Json
////////////////// Step 1
// The "serialize to JSON" behaviour is encoded in this trait
trait JsonWriter[A] {
@jamescmartinez
jamescmartinez / slack_delete.rb
Last active January 4, 2021 21:28
This Ruby script will bulk remove all Slack files older than 30 days. Just add your API token from https://api.slack.com/web#authentication into the token quotes at the top of the file.
require 'net/http'
require 'json'
require 'uri'
@token = ''
def list_files
ts_to = (Time.now - 30 * 24 * 60 * 60).to_i # 30 days ago
params = {
token: @token,
@kenjipm
kenjipm / workers.sql
Last active November 23, 2021 10:47
The following data definition defines an organization's employee hierarchy. An employee is a manager if any other employee has their managerId set to the first employees id. An employee who is a manager may or may not also have a manager. TABLE employees id INTEGER NOT NULL PRIMARY KEY managerId INTEGER REFERENCES employees(id) name VARCHAR(30) …
SELECT name FROM employees
WHERE id NOT IN (SELECT managerId FROM employees WHERE managerId IS NOT NULL);
@tpai
tpai / instructions.md
Last active September 22, 2022 11:20
use both Tor and Privoxy with Mac OSX

1. install

brew install tor
brew install privoxy

2. copy and modify config file

@haojian
haojian / secret_garden.py
Created August 12, 2015 22:42
secret garden
import skimage;
from skimage import data
from skimage.filters import threshold_otsu
from skimage.segmentation import clear_border
from skimage.measure import label
from skimage.morphology import closing, square
from skimage.measure import regionprops
from skimage.color import label2rgb
import cv2
import numpy as np