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 bash | |
set -Eeuo pipefail | |
log() { | |
echo -en '\033[1;32m' | |
echo -n "$@" | |
echo -e '\033[0m' | |
} | |
choice() { |
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 python2 | |
# -*- coding: UTF-8 -*- | |
# Note: A newer version of this script is located at https://github.com/trustin/smi2ass | |
# | |
# Copyright (C) 2018 Trustin Heuiseung Lee and other contributors | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; either version 2 | |
# of the License, or (at your option) any later version. |
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/bash | |
if [[ $# -gt 0 ]]; then | |
CLONE=1 | |
else | |
CLONE=0 | |
fi | |
function get_max_resolution() { | |
xrandr | grep -A100 "^$1 " | grep -P '^\s+[0-9]+x[0-9]+\s+[0-9\.]+\s*\*?\+.*$' | head -1 | awk '{ print $1; }' | |
} |
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
diff -urN a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c | |
--- a/src/wl/sys/wl_cfg80211_hybrid.c 2015-09-12 16:39:28.000000000 +0900 | |
+++ b/src/wl/sys/wl_cfg80211_hybrid.c 2015-09-12 16:50:44.908084821 +0900 | |
@@ -2150,8 +2150,12 @@ | |
WL_DBG(("\n")); | |
if (status == WLC_E_STATUS_SUCCESS) { | |
- err = wl_bss_roaming_done(wl, ndev, e, data); | |
- wl->profile->active = true; | |
+ if (!wl_bss_roaming_done(wl, ndev, e, data)) { |
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/bash | |
# 0 - Init, 1 - Set XKBMAP | |
KBD_STATUS=0 | |
while true; do | |
KBD_OPT='caps:super,terminate:ctrl_alt_bksp' | |
if [[ $KBD_STATUS -eq 1 ]]; then | |
setxkbmap -query | grep -qF "$KBD_OPT" || ((KBD_STATUS=0)) | |
fi |
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
diff -urN wine-orig/dlls/gdi32/freetype.c wine-patched/dlls/gdi32/freetype.c | |
--- wine-orig/dlls/gdi32/freetype.c 2013-07-19 02:57:36.000000000 +0900 | |
+++ wine-patched/dlls/gdi32/freetype.c 2013-11-01 11:05:11.998232947 +0900 | |
@@ -6199,10 +6199,15 @@ | |
} | |
if(format & GGO_UNHINTED) { | |
- load_flags |= FT_LOAD_NO_HINTING; | |
format &= ~GGO_UNHINTED; | |
} |
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/bash | |
SINK="`pactl info | grep -P '^Default Sink: ' | sed 's/[^:]\+:\s\+//'`" | |
[[ -z "$SINK" ]] && exit 1 | |
if [[ "$SINK" =~ DragonFly ]]; then | |
INCR='24' | |
MIN_VOLUME=65050 | |
MAX_VOLUME=65146 | |
else | |
INCR='2%' |
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
$ wrk -c 1024 -d 120m -t 1 --latency http://localhost:8080/ | |
Running 120m test @ http://localhost:8080/ | |
1 threads and 1024 connections | |
Thread Stats Avg Stdev Max +/- Stdev | |
Latency 5.80ms 2.68ms 65.36ms 80.40% | |
Req/Sec 101.95k 221.90 107.00k 95.17% | |
Latency Distribution | |
50% 4.81ms | |
75% 5.45ms | |
90% 9.84ms |
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
4 + less_footprint: | |
=================== | |
$ wrk -c 1 -d 3m -t 1 --latency http://localhost:8080/ | |
Running 3m test @ http://localhost:8080/ | |
1 threads and 1 connections | |
Thread Stats Avg Stdev Max +/- Stdev | |
Latency 26.51us 76.35us 0.98ms 99.25% | |
Req/Sec 40.01k 81.60 41.00k 99.33% | |
Latency Distribution |
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/bash -e | |
SECRET_SIZE=128 | |
mkdir -p "$HOME/.local/tmp" | |
rm -f "$HOME/.local/tmp/btsync-secret".* | |
umask 0077 | |
SECRET_FILE="`mktemp "$HOME/.local/tmp/btsync-secret.XXXXXXXXXX"`" | |
echo -n "Generating a $SECRET_SIZE-byte secret " | |
head --bytes=$SECRET_SIZE /dev/random > "$SECRET_FILE" & | |
while true; do | |
CUR_SECRET_SIZE=`stat --format='%s' "$SECRET_FILE"` |