This file contains hidden or 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 look4luv (find, the, love, and, u, will, know) { | |
| if (--I <3) return | |
| the = find ? find.document : u || will || know || the || love | |
| love = '<3' | |
| find = (u || know || the || love) | |
| u = undefined | |
| u ? | |
| will : | |
| (find || the).title = the.title.endsWith(love) ? the.title.substr(0, the.title.length - love.length) : the.title + |
This file contains hidden or 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
| $ tf plan | |
| Refreshing Terraform state in-memory prior to plan... | |
| The refreshed state will be used to calculate this plan, but will not be | |
| persisted to local or remote state storage. | |
| kubernetes_namespace.default: Refreshing state... (ID: tkp-test) | |
| kubernetes_stateful_set.ingestor: Refreshing state... (ID: tkp-test/pingers) | |
| ------------------------------------------------------------------------ |
This file contains hidden or 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 <stdio.h> // printf, sprintf, fprintf | |
| #include <stdlib.h> // malloc | |
| int main() { | |
| const unsigned char bytearr[] = { 0x12, 0x34, 0x56, 0x78 }; | |
| const size_t arrlen = sizeof(bytearr); | |
| const size_t hexlen = 2; // hex representation of byte with leading zero | |
| const size_t outstrlen = arrlen * hexlen; | |
| char * outstr = malloc(outstrlen + 1); |
This file contains hidden or 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 | |
| # stigok 22-02-2018 | |
| KEYDIR=/etc/initcpio/keys | |
| function help { | |
| cat <<EOF | |
| This hook will embed decryption keys for the encrypted root device into | |
| initramfs to automatically mount the root partition after a successful | |
| decryption of the boot partition. |
This file contains hidden or 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
| import queue | |
| import threading | |
| import sys | |
| class ThreadedQueue: | |
| def __init__(self, task, timeout=10): | |
| self.threads = dict() | |
| self.queues = dict() | |
| self.task = task | |
| self.timeout = timeout |
This file contains hidden or 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
| # Set screen brightness | |
| # Usage: setbrightness more|less|<int> | |
| DIR="/sys/class/backlight/intel_backlight" | |
| MAX_VALUE=$( < $DIR/max_brightness ) | |
| MAX_STEP=${MAX_STEP:-8} | |
| STEP_AMOUNT=$(( $MAX_VALUE / $MAX_STEP )) | |
| CURRENT_VALUE=$( < $DIR/brightness ) | |
| CURRENT_STEP=$(( $CURRENT_VALUE / $STEP_AMOUNT )) |
This file contains hidden or 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
| const int SECOND = 1000; | |
| const int MINUTE = 60 * SECOND; | |
| const int RESOLUTION = 1 * SECOND; | |
| //const int EXTRA_TURN_TIME = SECOND; | |
| const int GREEN = 0; | |
| const int RED = 1; | |
| const int DRY_RUN = 1; // Comment this whole line to enable gpio pins |
This file contains hidden or 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
| def test(): | |
| print("Test method") | |
| if __name__ == "__main__": | |
| print("Main method") |
This file contains hidden or 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
| # See /boot/overlays/README for all available options | |
| gpu_mem=128 | |
| start_file=start_x.elf | |
| fixup_file=fixup_x.dat | |
| initramfs initramfs-linux.img followkernel | |
| # Enable ALSA interface | |
| audio=on | |
| uart0=off |
This file contains hidden or 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
| #import dialogs, ugfx, network, badge, deepsleep | |
| #import dialogs from micropython/unix/modules/dialogs.py | |
| import ugfx, network, badge, time | |
| mocked_messages = [ | |
| 'sshow: hei, verden!', | |
| 'krav: hello, world!', | |
| 'sshow: funker dette?', | |
| 'krav: ja :):):):)', | |
| 'sshow: hei, verden!', |