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
*.java merge=mergiraf | |
*.rs merge=mergiraf | |
*.go merge=mergiraf | |
*.js merge=mergiraf | |
*.jsx merge=mergiraf | |
*.json merge=mergiraf | |
*.yml merge=mergiraf | |
*.yaml merge=mergiraf | |
*.html merge=mergiraf | |
*.htm merge=mergiraf |
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 necessary packages | |
import sensor | |
import time | |
import image | |
# import the lcd optionally | |
# to use the LCD, uncomment Lines 9, 24, 33, and 100 | |
# and comment Lines 19 and 20 | |
#import lcd |
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
kernel=u-boot-dtok.bin | |
framebuffer_depth=16 | |
# Prevent the firmware from loading HAT overlays now that we handle pin muxing. | |
# ourselves. See: | |
# https://www.raspberrypi.org/documentation/configuration/device-tree.md#part3.4 | |
dtoverlay= | |
dtparam=i2c_arm=on,i2c_arm_baudrate=400000 | |
dtparam=spi=on |
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
@Singleton | |
public class FirebaseAdapter { | |
private FirebaseAuth.AuthStateListener mAuthListener; | |
private FirebaseAuth mAuth; | |
@Inject | |
public FirebaseAdapter() { | |
mAuth = FirebaseAuth.getInstance(); | |
initialiseAuth(); |
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
#alias update='sudo apt update && sudo apt dist-upgrade -y --auto-remove' | |
alias update='sudo nala update && sudo nala upgrade -y' | |
alias adb_camera='adb shell am start -a android.media.action.IMAGE_CAPTURE' | |
alias adb_launch='adb shell am start -a android.intent.action.MAIN ' | |
alias adb_brightness='adb shell am broadcast -a com.enhancedworld.devicemanager.SET_BRIGHTNESS --ei com.enhancedworld.devicemanager.extra.LEVEL ' | |
alias adb_flash_boot='adb remount; adb sync; adb reboot bootloader; fastboot flash boot $OUT/boot.img; fastboot reboot' | |
alias adb_peripherals='adb shell dumpsys com.google.android.things.pio.IPeripheralManager' | |
alias cat='batcat --theme "Monokai Extended"' | |
alias ping='prettyping --nolegend' | |
alias du="ncdu --color dark -rr -x --exclude .git --exclude node_modules" |
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 <sys/stat.h> | |
#include <sys/types.h> | |
#include <fcntl.h> | |
#include <unistd.h> | |
#include <stdio.h> | |
int main(int argc, char *argv[]) | |
{ | |
int maxfd, fd; |
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
#!/usr/bin/env sh | |
# Default values for blank parameters | |
DEBUG=0 | |
IN_FILE=/etc/some-input-file.conf | |
OUT_FILE=/var/log/some-output-file.log | |
# Option parser, the order doesn't matter | |
while [ $# -gt 0 ]; do | |
case "$1" in |
Ad-free time!, UnoTelly etc. services provide a nice way to unblock regions for Netflix and others using their custom DNS servers.
But I don't want to direct all my DNS traffic to them and I'm too lazy to manually configure all my devices (phones, tablets, media center boxes etc.). So here's how to transparently unblock Netflix for all your devices using the [Asuswrt Merlin][merlin] firmware. It's a custom router firmware which can be used on the Asus RT-N66U router for example.
Enable JFFS partition and SSH login from http://<ROUTER-IP>/Advanced_System_Content.asp
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
'use strict'; // allows use of new ES6 syntax and features with node.js | |
let FTDI = 'ttyUSB0'; | |
const PATH = './logger'; | |
let serial = require('serialport'); | |
let fs = require('fs'); | |
fs.mkdir(PATH, () => {}); |