Skip to content

Instantly share code, notes, and snippets.

View abrenoch's full-sized avatar
:shipit:
I may be slow to respond.

Dave Anderson abrenoch

:shipit:
I may be slow to respond.
View GitHub Profile
# Starts a BLE service, that allows central devices to register for notifications.
# When a button attached to GPIO-32 is pressed, the counter is incremented, and
# registerd central devices are notified.
#include <BLEDevice.h>
#include <BLEServer.h>
#include <BLEUtils.h>
#include <BLE2902.h>
#include "driver/rtc_io.h"
var str = 'class ಠ_ಠ extends Array {constructor(j = "a", ...c) {const q = (({u: e}) => {return { [`s${c}`]: Symbol(j) };})({});super(j, q, ...c);}}' +
'new Promise((f) => {const a = function* (){return "\u{20BB7}".match(/./u)[0].length === 2 || true;};for (let vre of a()) {' +
'const [uw, as, he, re] = [new Set(), new WeakSet(), new Map(), new WeakMap()];break;}f(new Proxy({}, {get: (han, h) => h in han ? han[h] ' +
': "42".repeat(0o10)}));}).then(bi => new ಠ_ಠ(bi.rd));';
try {
eval(str);
} catch(e) {
alert('Your browser does not support ES6!')
}
@leosuncin
leosuncin / JDownloader2.sh
Last active May 28, 2024 09:44
JDownloader 2 headless startup script
#!/bin/sh
DESC="JDownloader 2 Headless"
NAME=JDownloader2
PIDFILE=/var/run/$NAME.pid
COMMAND="/usr/bin/java -- -Djava.awt.headless=true -jar /home/osmc/jDownloader2/JDownloader.jar"
RUN_AS=osmc
d_start() {
start-stop-daemon --start --quiet --background --make-pidfile --pidfile $PIDFILE --chuid $RUN_AS --exec $COMMAND
@Skalman
Skalman / index.php
Created April 20, 2015 23:48
Dynamic RSS feeds from Youtube links
<?php
if (!isset($_GET['url'])) {
?>
<!DOCTYPE html>
<meta charset="utf-8">
<title>Youtube RSS creator</title>
<form>
<p>Create an RSS feed for the videos on the following page:
<p><input name="url" placeholder="E.g. https://www.youtube.com/user/scishow/videos" style="width: 30em">
@bahamas10
bahamas10 / cec-keypresses.sh
Last active January 16, 2022 13:02
use `cec-client` to fire events when keys are pressed
#!/usr/bin/env bash
#
# react to cec keypresses in the jankiest way possible
#
# Author: Dave Eddy <dave@daveeddy.com>
# Date: 10/15/2013
# Licens: MIT
# Tested on: Raspberry pi with libcec compiled from soure
onright() {