Skip to content

Instantly share code, notes, and snippets.

View winks's full-sized avatar
🚮
Computers were a bad idea.

Florian Anderiasch winks

🚮
Computers were a bad idea.
View GitHub Profile
@winks
winks / index.html
Created October 18, 2024 14:44 — forked from egeozcan/index.html
image viewer
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fullscreen Image Viewer</title>
<style>
body {
font-family: Arial, sans-serif;
}
FROM redhat/ubi8
RUN yum install -y --disableplugin=subscription-manager procps
CMD /bin/yes
@winks
winks / Env.hs
Created September 14, 2019 18:36 — forked from shapr/Env.hs
lookup environment variables, some of which do not exist. Handle whether exists or not.
module Main where
-- using http://hackage.haskell.org/package/base-4.12.0.0/docs/System-Environment.html#v:lookupEnv
import System.Environment
main :: IO ()
main = do
shell <- lookupEnv "SHELL" -- System.Environment.lookupEnv take a String
doesnotexist <- lookupEnv "DOESNOTEXIST"
print (checkEnvVars shell)
@winks
winks / .Xmodmap
Created March 31, 2018 09:25 — forked from fbettag/.Xmodmap
Logitech G610 xmodmap bindings for multimedia keys
! logitech g610 multimedia keys
keycode 170 = XF86AudioLowerVolume NoSymbol XF86AudioLowerVolume
keycode 92 = XF86AudioRaiseVolume NoSymbol XF86AudioRaiseVolume
keycode 189 = XF86AudioPrev NoSymbol XF86AudioPrev
keycode 190 = XF86AudioNext NoSymbol XF86AudioNext
keycode 184 = XF86AudioPlay XF86AudioPause XF86AudioPlay XF86AudioPause
keycode 207 = XF86AudioMute NoSymbol XF86AudioMute
keycode 147 = XF86AudioStop XF86Eject XF86AudioStop XF86Eject
@winks
winks / main.cpp
Created March 17, 2018 23:00
ASCII85
#include <cmath>
#include <fstream>
#include <iostream>
#include <sys/stat.h>
#include <vector>
int32_t ascii_to_int(std::string c) {
int32_t rv;
for (size_t i=0; i<c.size(); ++i) {
rv <<= 8;
@winks
winks / tidy.sh
Created February 27, 2018 07:45
Run clang-tidy
#!/bin/bash
verbose=0
arg=$1
if [ "$arg" = "-h" ]; then
echo "Usage: $0 [OPTIONS] [FILENAME]"
echo -e " -h\tShow this help"
echo -e " -v\tverbose - show more output"
echo
@winks
winks / fail.go
Last active August 2, 2017 09:45
package main
import "encoding/json"
import "strings"
import "fmt"
type Payload struct {
User string
}
func asdf() {
@winks
winks / quassel-focus.txt
Last active February 28, 2017 19:52
Testing highlights and focus with quassel
# all highlights done in channel #a
# channel #p is just something that I make active in quassel for this test, regardless if focused or not
# focused/unfocused means: quassel is the active/inactive window
# toast = tray notification window
# fine
windows unfocused | channel active: #p | toast: yes | colored channel: yes
linux unfocused | channel active: #p | toast: yes | colored channel: yes
@winks
winks / _init.rb
Last active January 27, 2017 23:11
# A _init.rb file contains Ruby code that will be executed when
# your application boots up. Use it to extend and modify other nodes!
#
# In this simple example, we're simply adding some convenience methods to
# all available blog posts for easier access to specific pieces of data.
extend_siblings do
def date
data.date
end
#!/bin/bash
ERR=0
for f in $(git diff --name-only HEAD HEAD~1); do
./build/check_puppet_syntax.sh $f
TMP=$?
if [ $TMP -ne 0 ]; then
ERR=$(($ERR + $TMP))
fi
done
exit $ERR