Skip to content

Instantly share code, notes, and snippets.

View arkag's full-sized avatar

Alex Kagno arkag

View GitHub Profile
[root@ip-192-168-###-### vouch-proxy-0.6.17]# ./vouch-proxy-0.6.17
2020-01-22T18:19:05.128Z INFO testing: true, using development console logger
2020-01-22T18:19:05.128Z DEBUG logLevel set to debug
2020-01-22T18:19:05.129Z WARN setting `vouch.cookie.maxage` to `vouch.jwt.maxage` value of 240 minutes (curently set to 14400 minutes)
2020-01-22T18:19:05.129Z INFO configuring oidc OAuth with Endpoint https://dev-number-admin.okta.com/oauth2/default/v1/authorize
2020-01-22T18:19:05.129Z DEBUG vouch.jwt.secret is 50 characters long
2020-01-22T18:19:05.129Z DEBUG vouch.session.key is 50 characters long
2020-01-22T18:19:05.129Z DEBUG checking availability of tcp port: 0.0.0.0:9090
2020-01-22T18:19:05.129Z DEBUG viper settings map[oauth:map[auth_url:https://dev-number-admin.okta.com/oauth2/default/v1/authorize callback_url:https://sub.domain.com/auth client_id:secret client_secret:secret provider:oidc scopes:[openid email] token_url:https://dev-number-admin.okta.com/oauth2/default/v1/token user_info_url:https://dev-nu
server {
server_name sub.domain.com;
root /usr/share/nginx/html;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ =404;
}
set $!alarmmsg1 = "hello";
set $!alarmfile = "alarm";
if ($programname == "hello" and $msg contains $!alarmmsg1) then { set $!appmsg = "alarm"; }
else { set $!appmsg = "not-an-alarm"; }
template(name="%$!alarmfile%" type="string" string="{{ hub_log_mount }}/%$!env%/%$!alarmfile%.log")
if ( $!appmsg == "alarm" ) then
{
action(name="alarm" type="omfile" dynaFile="%$!alarmfile%" fileCreateMode="0644" dirCreateMode="0755" dynaFileCacheSize="100")
Compiling: users/arkag/arkag.c [OK]
Compiling: keyboards/mechmini/v2/keymaps/arkag/keymap.c [OK]
Linking: .build/mechmini_v2_arkag.elf [ERRORS]
|
| .build/obj_mechmini_v2_arkag/keyboards/mechmini/v2/keymaps/arkag/keymap.o (symbol from plugin): In function `keymaps':
| (.text+0x0): multiple definition of `tap_dance_actions'
| .build/obj_mechmini_v2_arkag/arkag.o (symbol from plugin):(.text+0x0): first defined here
| .build/obj_mechmini_v2_arkag/keyboards/mechmini/v2/keymaps/arkag/keymap.o (symbol from plugin): In function `keymaps':
| (.text+0x0): multiple definition of `state'
| .build/obj_mechmini_v2_arkag/arkag.o (symbol from plugin):(.text+0x0): first defined here
void check_state (void) {
static bool slept_once, woke_once;
switch (state) {
case active:
if (!woke_once){rgblight_mode_noeeprom(DEF_RGB_MODE); woke_once = true;}
active_timer_two = timer_read();
elapsed = active_timer_two - active_timer_one;
if (elapsed < INACTIVE_DELAY) {state = active; return;}
state = inactive;
return;
@arkag
arkag / flash_rgb.c
Last active September 11, 2018 19:51
void flash_rgb (void) {
switch(current_state) {
case always_on:
set_color(underglow, false);
return;
case flash_begin:
timer_one = timer_read();
current_state = flash_off;
void surround_type(uint8_t num_of_char, uint8_t keycode) {
char str[2*(num_of_char + (num_of_char / 2))];
for (int i = 0; i < num_of_char; i++) {
}
for (int i = 0; i < (num_of_char/2); i++) {
SEND_STRING(X_LEFT);
}
}
#define MOD_GUI_MASK (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI))
#define MOD_CTL_MASK (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL))
#define MOD_ALT_MASK (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT))
#define MOD_SFT_MASK (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT))
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
switch (keycode) {
case KC_ESC:
if (get_mods() & MOD_GUI_MASK) {
@arkag
arkag / fade.c
Last active September 11, 2018 22:09
void buffer_fade(Color current_color, Color new_color) {
uint16_t difference = new_color.h - current_color.h;
for (int i = 0; i <= difference; i++) {
fade_buffer++;
}
}
void fade_rgb (void) {
switch(fade_state){
case start:
Color mod_color(Color current_color, bool should_add, uint16_t change_amount) {
uint16_t addlim = 359 - change_amount;
uint16_t sublim = change_amount;
uint16_t leftovers;
if (should_add) {
if (current_color.h <= addlim) {
current_color.h += change_amount;
} else {
leftovers = (359 + change_amount) % 359;
current_color.h = 0 + leftovers;