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 | |
# baraction.sh script for spectrwm status bar | |
print_backlight() { | |
if [ -e /sys/class/backlight/intel_backlight/brightness ]; then | |
BL=$(oled-backlight current) | |
echo -n " BL:$BL%" | |
else | |
echo -n " BL:Unknown" | |
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
package main | |
import ( | |
"flag" | |
"image" | |
"io/ioutil" | |
"log" | |
"sync" | |
"github.com/strukturag/libheif/go/heif" |
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
<?php | |
// This is untested code | |
class smsGateway_gatewayapi { | |
public $apifields = array( | |
'apitoken' => array("FriendlyName" => "API Token", "Type" => "text", "Size" => "64", ), | |
'senderid' => array("FriendlyName" => "Sender ID", "Type" => "text", "Size" => "15", ), | |
); | |
function sendSMSMessage() { |
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 | |
set -eux | |
sudo apt-get update | |
packages="postgresql-$PGVERSION postgresql-server-dev-$PGVERSION postgresql-common" | |
# bug: http://www.postgresql.org/message-id/[email protected] | |
sudo update-alternatives --remove-all postmaster.1.gz |
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 python3 | |
import subprocess | |
import argparse | |
import re | |
import os | |
parser = argparse.ArgumentParser(description='Mosh connection tool.') | |
parser.add_argument('target', metavar='target', type=str, help='the SSH target') | |
parser.add_argument('--port', type=int, default=22, help='the SSH port') | |
parser.add_argument('--new', help='Open a new session', action='store_true') |
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
# Max 3 mio states | |
set limit states 3000000 | |
# Adaptive state timeouts | |
set timeout { adaptive.start 400000, adaptive.end 3000000 } | |
# Own Traffic (front net does not route) | |
nat on ix0 from 212.98.89.24/30 -> 212.98.117.0/25 round-robin | |
# NAT NPF traffic with source hashing | |
# Use a static random hash to keep public IP across firewall changes/reloads |
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
# This is a shell archive. Save it in a file, remove anything before | |
# this line, and then unpack it by entering "sh file". Note, it may | |
# create directories; files and directories will be owned by you and | |
# have default permissions. | |
# | |
# This archive contains: | |
# | |
# norm | |
# norm/distinfo | |
# norm/Makefile |
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
--- protolib/src/common/protoSocket.cpp.orig 2015-06-25 13:43:52 UTC | |
+++ protolib/src/common/protoSocket.cpp | |
@@ -6,6 +6,7 @@ | |
#ifdef MACOSX | |
#include <arpa/nameser.h> | |
#endif // MACOSX | |
+#include <netinet/in.h> | |
#include <resolv.h> | |
#endif // HAVE_IPV6 | |
#include <sys/ioctl.h> |
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
#ifdef __FreeBSD__ | |
#include <sys/socket.h> | |
#endif | |
#include <arpa/inet.h> | |
#include <netinet/in.h> | |
#include <algorithm> // find, find_if_not, reverse_copy, for_each | |
#include <functional> // bind1st, std::equal_to | |
#include <string> // string | |
#include <iostream> // cout |
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 <cassert> // cassert | |
#include <cmath> // ceil | |
#include <iostream> // cout | |
#include <cstring> // memset, memcpy | |
// Given a UTF-8 encoded string, calculate the length of the resulting GSM | |
// 03.38 converted string. | |
// It assumes the input is valid UTF-8 and UTF-8 chars that can not be | |
// represented will be replaced with a single ? char. | |
// High optimized code, runs best with clang and optimizations (-O) enabled. |
NewerOlder