This file contains hidden or 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
{ pkgs, ... }: | |
{ | |
# https://devenv.sh/packages/ | |
packages = [ | |
pkgs.git | |
pkgs.direnv | |
pkgs.starship | |
pkgs.kubectl | |
pkgs.bash-completion |
This file contains hidden or 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 <asio/io_service.hpp> | |
#include <asio/ip/tcp.hpp> | |
#include <thread> | |
#include <asio.hpp> | |
using asio::ip::tcp; | |
#define MAX_DATABUF_SIZE 10240 | |
#define HEADER_LEN 4 |
This file contains hidden or 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
# plugins/filter/crc32.py | |
import binascii | |
def crc32(s): | |
return binascii.crc32(s) & 0xffffffff | |
class FilterModule(object): | |
''' Ansible core jinja2 filters ''' |
This file contains hidden or 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
{{ ansible_managed | comment }} | |
{% if collectd_plugin_postgresql %} | |
LoadPlugin postgresql | |
<Plugin postgresql> | |
<Query query_plans> | |
Statement "SELECT sum(seq_scan) AS seq, \ | |
sum(seq_tup_read) AS seq_tup_read, \ | |
sum(idx_scan) AS idx, \ | |
sum(idx_tup_fetch) AS idx_tup_fetch \ | |
FROM pg_stat_user_tables;" |
This file contains hidden or 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
function git-stash-pull () { | |
git stash clear | |
git stash | |
git pull --rebase | |
git stash apply | |
git stash clear | |
} |
This file contains hidden or 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
function gitcs () { | |
if [ -z $1 ]; then | |
echo "Missing commit number" | |
return 1 | |
fi | |
git commit -am "TEMP" && git rebase -i HEAD~$1 | |
} | |
function git-merge-to () { |
This file contains hidden or 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
{{ ansible_managed | comment }} | |
[Unit] | |
Description=Tomcat 8 %I servlet container | |
After=network.target | |
[Service] | |
Type=forking | |
PIDFile=/var/run/tomcat8_%I.pid | |
Environment=CATALINA_PID=/var/run/tomcat8_%I.pid | |
Environment=TOMCAT_TMP_DIR=/var/lib/tomcat8_%I/tmp |