SELECT pid,datname,usename,application_name,client_hostname,client_port,backend_start,query_start,query
FROM pg_stat_activity
WHERE state <> 'idle'
AND pid<>pg_backend_pid();
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 | |
# get the other connected monitor (not the internal) | |
other=`xrandr |grep " connected" | awk '{print $1}' | grep -v 'eDP-1\|^$i'` | |
xrandr --output eDP-1 --auto --below $other --output $other --auto |
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
workspace: | |
base: /go | |
pipeline: | |
backend: | |
image: golang | |
commands: | |
- go get -t ./... | |
- go test | |
- go build |
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
apk update | |
apk add udev xorg-server xf86-input-evdev xf86-video-vesa setxkbmap | |
apk add build-base git libcurl libxft-dev libx11-dev libxinerama-dev lxterminal | |
apk add ca-certificates wget | |
update-ca-certificates | |
rc-update add udev sysinit | |
rc-update add udev-postmount default | |
git clone https://github.com/hamdouni/myDwm | |
cd myDwm/programs/dwm-6.0 | |
make && make install |
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.util.Date; | |
public class printDate { | |
public static void main(String[] args) { | |
Date d = new Date(); | |
System.out.println(d); | |
} | |
} |
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
# Example with a mysql container running at 10% cpu | |
docker run --cpu-quota=10000 --name esc-db -d --volumes-from dbdata -p 127.0.0.1:3306:3306 -v $(pwd)/data:/data softinnov/esc-db |
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
{ | |
"go.formatOnSave": true, | |
"go.formatTool": "goimports" | |
} |
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 | |
a1="◐" | |
a2="◒" | |
a3="◑" | |
a4="◓" | |
i=1 | |
while true | |
do |
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
rebol [] | |
decode: func [ | |
{ | |
Decode a UTF-8 encoded string into latin1. | |
Adapted from http://www.rebol.org/view-script.r?script=utf-8.r | |
} | |
xs [string!] | |
/local m x c result [string!] | |
][ |
NewerOlder