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
// ==UserScript== | |
// @name KeyBR Colemak-DH Ortholinear Split | |
// @namespace http://tampermonkey.net/ | |
// @version v1.0 | |
// @description Switch Colemak layout in keybr.com to Colemak DH Ortholinear Split | |
// @author https://github.com/jonnyirwin | |
// @match https://www.keybr.com/ | |
// @icon https://www.google.com/s2/favicons?domain=keybr.com | |
// @grant none | |
// ==/UserScript== |
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
// ==UserScript== | |
// @name KeyBR Colemak-DH | |
// @namespace http://tampermonkey.net/ | |
// @version v1.1 | |
// @description Switch Colemak layout in keybr.com to Colemak DH | |
// @author https://github.com/Zyst | |
// @match https://www.keybr.com/ | |
// @icon https://www.google.com/s2/favicons?domain=keybr.com | |
// @grant none | |
// @contributors https://github.com/hilarycheng |
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
import java.math.MathContext | |
sealed trait Expression { | |
def compute: BigDecimal | |
def show: String | |
} | |
sealed trait Amount[T] extends Expression | |
sealed trait Constant extends Expression |
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
class Example(serviceA: ServiceA, serviceB: ServiceB, serviceC: ServiceC) { | |
def sum(x: Int, y: Int): Int = { | |
serviceA.foo(x) | |
serviceB.bar(y) | |
// Doesn't call serviceC, so any test expecting it should fail | |
x + y | |
} | |
} | |
trait ServiceA { |
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
when(mockSiebelIntegration.changeClientAddress(any())(any())).thenReturnAsync(xml) | |
when(mockSiebelIntegration.changeOfficeForAction(any(), any())(any())).thenReturnAsync(xml) | |
def ? = any() | |
when(mockSiebelIntegration.changeClientAddress(?)(?)).thenReturnAsync(xml) | |
when(mockSiebelIntegration.changeOfficeForAction(?, ?)(?)).thenReturnAsync(xml) |
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
/*** | |
Copyright (c) 2016, Alexander Choporov aka CoolCmd | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | |
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | |
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | |
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. | |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDE |
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
#!/bin/python | |
import subprocess, time | |
target = 100 | |
step = 5 | |
cur_target = target | |
while True: | |
if "Discharging" in str(subprocess.check_output(["cat", "/sys/class/power_supply/BAT0/status"])): | |
aux = subprocess.check_output(["acpi"]) | |
acpi_res = aux.split() |
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
[gui] | |
absolute_position= | |
always_on_top=true | |
background_color=#000000 | |
bounce=true | |
bounce_duration=500 | |
font=Sans | |
font_size=13 | |
font_variant=medium | |
foreground_color=#999999 |
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
#! /bin/sh | |
. panel_colors | |
num_mon=$(bspc query -M | wc -l) | |
PADDING=" " | |
while read -r line ; do | |
case $line in | |
N*) |
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
#! /bin/zsh | |
PANEL_FIFO=/tmp/panel-fifo | |
PANEL_HEIGHT=25 | |
PANEL_FONT_FAMILY="Monaco:size=9" | |
ICON_FONT="FontAwesome:size=11" | |
if [ $(pgrep -cx panel) -gt 1 ]; then | |
printf "%s\n" "The panel is already running." >&2 | |
exit 1 |