Skip to content

Instantly share code, notes, and snippets.

View minimum-necessary-change's full-sized avatar

minimum-necessary-change

View GitHub Profile
/*
The MIT License (MIT)
Copyright (c) 2014 Ismael Celis
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@minimum-necessary-change
minimum-necessary-change / bs-loaded.php
Created January 30, 2021 05:31 — forked from bryanwillis/bs-loaded.php
Bootstrap check if loaded
<!-- BOOTSTRAP JS WITH LOCAL FALLBACK-->
<script type="text/javascript" src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.1.1/js/bootstrap.min.js"></script>
<script> if(typeof($.fn.modal) === 'undefined') {document.write('<script src="//www.mysite.com/js/v/bootstrap-2.1.1.js"><\/script>')}</script>
<!-- BOOTSTRAP CDN FALLBACK CSS-->
<script>$(document).ready(function() {
var bodyColor = $('body').css("color"); if(bodyColor != 'rgb(51, 51, 51)') {$("head").prepend("<link rel='stylesheet' href='//www.mysite.com/css/fw/bootstrap-combined-2.1.1.css' type='text/css' media='screen'>");}
});</script>
@minimum-necessary-change
minimum-necessary-change / ddns-start
Created January 24, 2021 13:43 — forked from ql-owo-lp/ddns-start
Asus-Merlin-DuckDNS
#!/bin/sh
# register a subdomain at https://www.duckdns.org/ to get your token
# put 'hostname|token' in the 'Host Name' field under DDNS
# e.g. myhost|abcdefgh-1234-5678-9876-f71b0ed7a7fe
DDNS_HOSTNAME_FIELD=$(nvram get ddns_hostname_x)
SUBDOMAIN=$(echo "$DDNS_HOSTNAME_FIELD" | awk -F'|' '{print $1}')
TOKEN=$(echo "$DDNS_HOSTNAME_FIELD" | awk -F'|' '{print $2}')
IPV4=$(nvram get wan0_ipaddr)
$sudo add-apt-repository ppa:alessandro-strada/ppa
$sudo apt-get update
$sudo apt-get install google-drive-ocamlfuse
$google-drive-ocamlfuse
$mkdir -p ~/GoogleDrive
$google-drive-ocamlfuse ~/GoogleDrive
@minimum-necessary-change
minimum-necessary-change / stretch2buster.txt
Created December 16, 2020 17:20
Armbian - Upgrade Stretch to Buster
cp /etc/apt/sources.list /etc/apt/sources.list.backup
sed -i 's|stretch|buster|g' /etc/apt/sources.list
apt update && apt -y upgrade && apt -y dist-upgrade
@minimum-necessary-change
minimum-necessary-change / install_sis_graphics_on_linux.sh
Created May 1, 2020 15:25 — forked from fevangelou/install_sis_graphics_on_linux.sh
Bash script to install SiS Mirage 3+ graphics drivers on Linux
#!/bin/bash
# Bash script to install SiS Mirage 3+ graphics drivers on Linux
# Supports 671/672MX graphics cards
#
# Created in March 2019
#
# Tested on:
# - Lubuntu 18.04 (32-bit) with X.Org v1.19
# - Xubuntu 18.04 (64-bit) with X.Org v1.20
@minimum-necessary-change
minimum-necessary-change / gist:460e0b0cc40c289b38d2b85f4ce294f4
Created September 24, 2019 06:41 — forked from bhumphrey/gist:3764983
Cherry-picking from another fork
git checkout <branch>
git fetch <other-fork-alias>
git cherry-pick <commit-hash>
git push <your-fork-alias>
/*
Toaster Oven SMT soldering control
Adrian Bowyer
2 November 2011
Licence: GPL
@minimum-necessary-change
minimum-necessary-change / fand.c
Created August 2, 2019 18:22 — forked from andreacioni/fand.c
Simple utility program for GNU/Linux systems to control a fan motor of your miniPC (UDOO,Raspberry Pi,Orange Pi,etc) through a PWM signal
/*
A Project of Andrea Cioni
Title: Fan Daemon (FanD)
Author: Andrea Cioni (andreacioni)
cioni95@gmail.com
Copyright:
Copyright (c) 2017 Andrea Cioni <cioni95@gmail.com>
@minimum-necessary-change
minimum-necessary-change / dict.c
Created July 25, 2019 13:53 — forked from kylef/dict.c
A key/value dictionary system in C
/* A key/value dict system in C */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define TEST TRUE /* Comment this line out to compile without a main function (used when including into another application). */
typedef struct dict_t_struct {
char *key;
void *value;