Skip to content

Instantly share code, notes, and snippets.

View cypres's full-sized avatar

Hans Arnholm cypres

View GitHub Profile
@cypres
cypres / gatewayapi.php
Last active April 7, 2017 12:03
WHMCSnow integration with GatewayAPI.com
<?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() {
@cypres
cypres / race.go
Last active August 28, 2019 12:30
libheif segfault reproduce script
package main
import (
"flag"
"image"
"io/ioutil"
"log"
"sync"
"github.com/strukturag/libheif/go/heif"
@cypres
cypres / baraction.sh
Created January 3, 2021 23:29
baraction.sh script for spectrwm status bar
#!/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