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
--- | |
Language: Cpp | |
AccessModifierOffset: -8 | |
AlignAfterOpenBracket: DontAlign | |
AlignConsecutiveAssignments: false | |
AlignConsecutiveDeclarations: false | |
AlignEscapedNewlines: Left | |
AlignOperands: true | |
AlignTrailingComments: 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
# /usr/lib/systemd/system/asus-kbd-backlight.service | |
[Unit] | |
Description=Asus Keyboard Backlight | |
Wants=systemd-backlight@leds:asus::kbd_backlight.service | |
After=systemd-backlight@leds:asus::kbd_backlight.service | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/bin/chown root:backlight /sys/class/leds/asus::kbd_backlight/brightness |
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 | |
# count lines of code, excluding comments and empty lines. | |
# (c) silverweed - released under Public Domain | |
comment_style() { | |
local CS='' | |
case $1 in | |
c|cpp|cs|java*|js) CS='^\s*//|^\s*\*|^\s*/\*' ;; | |
sh|bash|zsh|ruby|py*) CS='^\s*#' ;; | |
lua) CS='--' ;; |
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
require "crsfml" | |
require "option_parser" | |
TILE_SIZE = 32_u32 | |
alias Point = Tuple(UInt32, UInt32) | |
ARROW_SCALE = {32, 32} | |
CONF = { |
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
{-# LANGUAGE OverloadedStrings, ExtendedDefaultRules #-} | |
module Main where | |
import Database.MongoDB | |
import Data.Text (unpack) | |
import Data.Int (Int64) | |
import Data.List (groupBy, nub) | |
import Data.DateTime (DateTime, fromSeconds, toGregorian') | |
import Data.UnixTime (diffUnixTime, secondsToUnixDiffTime, fromEpochTime, udtSeconds) |
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
--------------------------------------------------- | |
-- Licensed under the GNU General Public License v2 | |
-- * (c) 2016, silverweed | |
--------------------------------------------------- | |
-- {{{ Grab environment | |
local tonumber = tonumber | |
local setmetatable = setmetatable | |
local string = { gmatch = string.gmatch } | |
-- }}} |
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
window.startClock = (finalTime, startingDiffHrs) -> | |
$ = init() | |
drawCircle = (coord) -> | |
sw 2 | |
s circle coord... | |
fcol 0, 0, 0 | |
f circle coord[0], coord[1], coord[2]/20 | |
for i in [1..10] | |
a = 2*PI/10 * i |
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
/* experimental hash library in ANSI C | |
* @author silverweed | |
* @license GNU GPL v3 | |
*/ | |
#include "hash.h" | |
#include <stdlib.h> | |
#define DEBUG 1 | |
#if DEBUG >= 1 |
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 ROCK program | |
-- Print all primes up to limit. | |
-- Note: the function calling convention is that: | |
-- 1- arguments are passed via the $arg, $arg2, ... variables. | |
-- 2- return values are passed via the $res, $res2, ... variables. | |
-- 3- all those variables must be declared by the callee. | |
-- 4- internally, all functions use labels with names prefixed by | |
-- function_name_* | |
-- 5- internally, all functions call variables with a leading _. | |
-- This means that all variables starting with a _ should be considered |
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/python3 | |
# simple Pokepon client | |
# by silverweed | |
import telnetlib | |
import getpass | |
import hashlib | |
import sys | |
import signal | |
from threading import Thread | |
import re |