Skip to content

Instantly share code, notes, and snippets.

View tomjuggler's full-sized avatar
💭
Juggling Code

Tom tomjuggler

💭
Juggling Code
View GitHub Profile
@ruario
ruario / intro-latest-widevine.md
Last active January 29, 2024 07:53
Fetches the latest Linux Widevine binary so that it can be used by Vivaldi.

With the release of Vivaldi 2.2, this page is now obsolete and unmaintained. Widevine is fetched automatically on post install of our official packages. The information below and the script are left for historical reasons but will not be updated.

If you are using something newer than Vivaldi 2.2, you should not be using this script as there is simply no need. Any need you think you have for it would be a bug IMHO and thus should be logged in a bug report. Before you do so however, you should also checkout the Vivaldi help page on Widevine, on Linux


Summary

A bunch of people asked how they could use this script with pure Chromium on Ubuntu. The following is a quick guide. Though I still suggest you at least try Vivaldi. Who knows, you might like it. Worried about proprietary componants? Remember that libwidevinecdm.so is a b

@sjorge
sjorge / syncthing-backup.md
Last active July 31, 2023 14:16
using syncthing for backups

introduction

I wanted to replace rsync for my current host backups.

I had 2 hosts (1 laptop and 1 desktop) that would get there changes polled from a backup server. (polled = cronjob ran every hours) Ofcourse those boxes are not always on and a frenzy of cron mails happen every now and then.

I replaced everything with syncthing, they have clients available for linux, illumos, openbsd and mac. With the config below (client::folder master = yes, server::folder master = no) we prevent the server from accidentally overriding a file on the client. The client knows the server's IPv4 and/or IPv6 address so we do not need global or local discovery nor UPnP.

@PCJohn
PCJohn / ServoScan.ino
Last active February 19, 2024 07:34
A processing and arduino sketch for 3D mapping with an ultrasonic sensor
/*
Arduino program to control a ultrasonic 3-D mapping sensor.
The programs controls an HC-SR04 ultrasonic sensor connected to the Arduino board.
A collaborating Processing sketch interacts with this program with serial communication to control the angle
Authors:Prithvijit Chakrabarty (prithvichakra@gmail.com)
Kartik S. Lovekar (kslovekar@gmail.com)
*/
#include <Servo.h>
#include <NewPing.h>
@davetromp
davetromp / UpOrDown.sh
Created November 28, 2012 22:29
Bash script that checks if a site is up or down and emails notifications
#!/bin/bash
################################################################################
# This script will check to see if a website is up/down by pinging the url
# If there is no response an email wil be send via an external smtp mail server
# If the site status is down an email will be send when the site is up again
# set your check interval here :-) #############################################
interval=3600 # hour
@holachek
holachek / Makefile
Created August 9, 2012 14:53
AVR Tutorial Makefile
# Name: Makefile
# Author: <insert your name here>
# Copyright: <insert your copyright message here>
# License: <insert your license reference here>
# DEVICE ....... The AVR device you compile for
# CLOCK ........ Target AVR clock rate in Hertz
# OBJECTS ...... The object files created from your source files. This list is
# usually the same as the list of source files with suffix ".o".
# PROGRAMMER ... Options to avrdude which define the hardware you use for
@brigand
brigand / AutoHotkeyTest.java
Created December 28, 2011 06:26
Using AutoHotkey in a Java program
// All depends can be found here: http://apps.aboutscript.com/jhk/JHK.zip
// Video: http://youtu.be/EX0iT0NTTjw
import com.eaio.nativecall.*;
public class AutoHotkeyTest {
private static IntCall exec;
public static void main(String[] args) {
System.out.println("Hello World");
@atduskgreg
atduskgreg / rotation_around_a_point.pde
Created December 24, 2011 05:22
Controlling the center of rotation in Processing
// Rotation Around a Point
// ***********************
// To acheive rotation around a given point
// - translate to that point
// - rotate
// - then translate back
// (note: in Processing this last step is implicit
// since draw() resets all transformations
// each time it runs.)
@senko
senko / onchange.sh
Last active July 14, 2023 07:54
OnChange - Watch current directory and execute a command if anything in it changes
#!/bin/bash
#
# Watch current directory (recursively) for file changes, and execute
# a command when a file or directory is created, modified or deleted.
#
# Written by: Senko Rasic <senko.rasic@dobarkod.hr>
#
# Requires Linux, bash and inotifywait (from inotify-tools package).
#
# To avoid executing the command multiple times when a sequence of
@hnur
hnur / main.c
Created May 4, 2011 07:26 — forked from funkfinger/main.c
ATTiny85 3 channel software PWM to drive RGB LED
// based largely on Atmel's AVR136: Low-Jitter Multi-Channel Software PWM Application Note:
// http://www.atmel.com/dyn/resources/prod_documents/doc8020.pdf
#include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>
#define CHMAX 3 // maximum number of PWM channels
#define PWMDEFAULT 0x00 // default PWM value at start up for all channels