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 std = @import("std"); | |
const testing = std.testing; | |
fn writeFieldName(writer: anytype, name: []const u8) !void { | |
// For field names, we need to check if it needs to be quoted with @"" | |
const needs_escaping = blk: { | |
if (name.len == 0) break :blk true; | |
// Check if the name is a valid Zig identifier | |
for (name, 0..) |c, i| { |
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
from bs4 import BeautifulSoup | |
from requests_html import HTMLSession | |
import re | |
url = '' | |
assert 'https://www.ruv.is/utvarp/spila' in url | |
with HTMLSession() as s: | |
resp = s.get(url).html | |
resp.render() # Run JavaScript code on webpage |
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
var noble = require('noble'); | |
var net = require('net'); | |
var PORT = 33333; | |
// var HOST = '127.0.0.1'; | |
var HOST = '10.8.11.108'; | |
var dgram = require('dgram'); | |
var wave_service_uuid = '289b473c4d1e11e7b114b2f933d5fe66'; |
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
// Enable the spidev interface | |
/dts-v1/; | |
/plugin/; | |
/ { | |
compatible = "allwinner,sun7i-a20"; | |
fragment@0 { | |
target-path = "/aliases"; | |
__overlay__ { |
This file has been truncated, but you can view the full file.
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
[[0;32m o.k. [0m] This script will try to update | |
From https://github.com/igorpecovnik/lib | |
f9662cb..12e3838 master -> origin/master | |
Updating f9662cb..12e3838 | |
Fast-forward | |
config/kernel/linux-cubox-next.config | 6 +- | |
config/kernel/linux-odroidxu4-default.config | 9 +- | |
config/kernel/linux-odroidxu4-next.config | 186 ++++++++++++++++----- | |
configuration.sh | 11 ++ | |
debootstrap-ng.sh | 31 ++-- |
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
[ 840.490068] INFO: task kworker/u:0:5 blocked for more than 120 seconds. | |
[ 840.497420] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. | |
[ 840.506139] kworker/u:0 D c068fdc4 0 5 2 0x00000000 | |
[ 840.506189] [<c068fdc4>] (__schedule+0x574/0x7fc) from [<c06900dc>] (schedule+0x90/0x94) | |
[ 840.506212] [<c06900dc>] (schedule+0x90/0x94) from [<c068e01c>] (schedule_timeout+0x2c/0x2bc) | |
[ 840.506235] [<c068e01c>] (schedule_timeout+0x2c/0x2bc) from [<c068f5b8>] (wait_for_common+0x120/0x168) | |
[ 840.506258] [<c068f5b8>] (wait_for_common+0x120/0x168) from [<c068f620>] (wait_for_completion+0x20/0x24) | |
[ 840.506284] [<c068f620>] (wait_for_completion+0x20/0x24) from [<c045df80>] (sunxi_spi_work+0x748/0x888) | |
[ 840.506312] [<c045df80>] (sunxi_spi_work+0x748/0x888) from [<c0044508>] (process_one_work+0x248/0x404) | |
[ 840.506336] [<c0044508>] (process_one_work+0x248/0x404) from [<c0045940>] (worker_thread+0x1b4/0x2d0) |
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
sudo dd if= of=/dev/sdx bs=64M status=progress |
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
// http://stackoverflow.com/questions/38515708 | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char argv[]){ | |
char *filename = "test.db"; | |
int my_int = 42; | |
// First we open file and write to it |
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
// A code snippet to show how one way to | |
// seperate incoming MIDI CC signals and the | |
// server side. | |
( | |
MIDIIn.connectAll; | |
a = Bus.control(s); | |
MIDIdef.cc(\cc_test, { |src, chan, num, value| | |
[src, chan, num, value, src.linexp(0, 127, 10, 10000)].postln; |
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
sudo apt-get update && sudo apt-get upgrade | |
sudo apt-get install -y mendeleydesktop htop | |
# Install f.lux | |
# Install dependencies | |
sudo apt-get install -y git python-appindicator python-xdg python-pexpect python-gconf python-gtk2 python-glade2 libxxf86vm1 -y | |
# Download and install xflux-gui | |
cd /tmp | |
git clone "https://github.com/xflux-gui/xflux-gui.git" |
NewerOlder