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
#include <iostream> | |
#include <vector> | |
#include <cstdio> | |
using namespace std; | |
#define EACH(it, cont) for (auto &it: cont) | |
#define TermReset "\e[0m" | |
#define TermBlack "\e[0;30m" | |
#define TermRed "\e[0;31m" |
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 | |
# | |
# list of synaptics device properties http://www.x.org/archive/X11R7.5/doc/man/man4/synaptics.4.html#sect4 | |
# list current synaptics device properties: xinput list-props '"SynPS/2 Synaptics TouchPad"' | |
# | |
#sleep 5 #added delay... | |
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" 8 1 | |
xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Pressure" 4 | |
xinput --set-prop --type=int --format=32 "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Width" 9 # Below width 1 finger touch, above width simulate 2 finger touch. - value=pad-pixels |
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 | |
# remove files not in arrar 'files_to_keep' | |
find -type f -name '*.bin' \ | |
| awk -v keep=" ${files_to_keep[*]} " -e 'keep !~ " "$0" "' \ | |
| xargs -L1 -I II sh -c 'git rm -f II 2>/dev/null || rm II' |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Stoper to keep your standup under control (at least it duration)</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<style> | |
body { | |
text-align: center; |
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
package main | |
import ( | |
"errors" | |
"fmt" | |
"html/template" | |
"io" | |
"os" | |
"strings" | |
) |
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
package main | |
import ( | |
"flag" | |
"io/ioutil" | |
"os" | |
yaml "gopkg.in/yaml.v2" | |
) |
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
func Test(t *testing.T) { | |
fatalIf := func(err error) { | |
if err != nil { | |
t.Fatal(err) | |
} | |
} | |
err := os.MkdirAll(TEST_DATA_DIR, 0700) | |
fatalIf(err) | |
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
func TestUpdate(t *testing.T) { | |
os.RemoveAll(TEST_DATA_DIR) | |
defer os.RemoveAll(TEST_DATA_DIR) | |
if err := os.MkdirAll(TEST_DATA_DIR, 0700); err != nil { | |
t.Fatal(err) | |
} | |
if err := ioutil.WriteFile(TEST_DATA_DIR+"/number_of_partitions", []byte("2"), 0600); err != nil { | |
t.Fatal(err) | |
} | |
db, err := OpenDB(TEST_DATA_DIR) |
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
:loop | |
if exist remote.done ( | |
timeout 2 | |
goto loop | |
) | |
call remote.recipe.bat | |
goto loop |
NewerOlder