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
Color mod_color(Color change, bool add, uint16_t modifier) { | |
uint16_t addlim = 359 - modifier; | |
uint16_t sublim = modifier; | |
uint16_t leftovers; | |
if (add) { | |
if (change.h <= addlim) { | |
change.h += modifier; | |
} else { | |
leftovers = modifier - (359 - change.h); | |
change.h = 0 + leftovers; |
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 working!! | |
void matrix_scan_user(void) { | |
if (flash && !flash_on_started && !flash_off_started) { | |
flash_start_timer = timer_read(); | |
flash_on_started = true; | |
set_color(underglow, false); | |
} else if (flash && flash_on_started && !flash_off_started) { | |
uint16_t flash_timer = timer_read(); | |
uint16_t elapsed = flash_timer - flash_start_timer; | |
if (elapsed >= LED_FLASH_DELAY) { |
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
lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c:38: | |
lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h:365:5: error: 'const' attribute on function returning 'void' [-Werror=attributes] | |
void CDC_Device_Event_Stub(void) ATTR_CONST; | |
^~~~ | |
lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.h:367:10: error: 'EVENT_CDC_Device_LineEncodingChanged' alias between functions of incompatible types 'void(USB_ClassInfo_CDC_Device_t * const)' {aka 'void(struct <anonymous> * const)'} and 'void(void)' [-Werror=attribute-alias] | |
void EVENT_CDC_Device_LineEncodingChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo) | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
lib/lufa/LUFA/Drivers/USB/Class/Device/CDCClassDevice.c:356:6: note: aliased declaration here | |
void CDC_Device_Event_Stub(void) | |
^~~~~~~~~~~~~~~~~~~~~ |
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
void set_os(OS type, bool update) { | |
userspace_config.curr_os = type; | |
underlight_color = HSV_COEFFICIENT * type; | |
switch (type) { | |
case OS_MAC: | |
set_unicode_input_mode(UC_OSX_RALT); | |
userspace_config.next_os = OS_WIN; | |
break; | |
case OS_WIN: |
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 QMK_KEYBOARD_H | |
#define _BL 0 | |
#define _FN1 1 | |
#define _FN2 2 | |
#define _FN3 3 | |
#define _FN4 4 | |
#define LEADER_TIMEOUT 750 | |
#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) |
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
2/keymaps/ark/keymap.c:42:6: error: function declaration isn't a prototype [-Werror=strict-prototypes] | |
void toggle_os() { | |
^~~~~~~~~ | |
keyboards/mechmini/v2/keymaps/ark/keymap.c: In function 'process_record_keymap': | |
keyboards/mechmini/v2/keymaps/ark/keymap.c:178:9: error: case label value exceeds maximum value for type [-Werror] | |
case TOG_OS: | |
^~~~ | |
keyboards/mechmini/v2/keymaps/ark/keymap.c:181:9: error: case label value exceeds maximum value for type [-Werror] | |
case M_PRI_MOD: | |
^~~~ |
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
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | |
switch (keycode) { | |
case TOG_OS: | |
is_mac = ! is_mac; | |
break; | |
case M_GUI_CTRL: | |
is_mac ? tap_key(KC_CTRL) : tap_key(KC_GUI); | |
break; | |
case M_CTRL_GUI: | |
is_mac ? tap_key(KC_GUI) : tap_key(KC_CTRL); |
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
void code_snippet(void) { | |
SEND_STRING("``````" SS_TAP(X_LEFT) SS_TAP(X_LEFT) SS_TAP(X_LEFT)); | |
} | |
void short_snippet(void) { | |
SEND_STRING("``" SS_TAP(X_LEFT)); | |
} | |
void dance_grv (qk_tap_dance_state_t *state, void *user_data) { | |
if (state->count == 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
function New-BackspaceLn { | |
[CmdletBinding()] | |
Param ([String]$Sentence) | |
$Backspaces = "`b" * $Sentence.Length | |
return "$Sentence$Backspaces" | |
} | |
function Write-HostSimType { | |
[CmdletBinding()] |
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
[CmdletBinding(DefaultParameterSetName = 'Set1')] | |
Param( | |
[Parameter(Mandatory, ParameterSetName = 'Set1')] | |
# Currently doesn't support 365 silent installers | |
[ValidateSet('2016OL'<#,'365IM','365MS'#>)] | |
[String]$Office, | |
[Parameter(Mandatory, ParameterSetName = 'Set2')] | |
[Switch]$NoOffice, | |
[Parameter(Mandatory)] | |
[String]$Name, |