Skip to content

Instantly share code, notes, and snippets.

View baudm's full-sized avatar

Darwin Bautista baudm

View GitHub Profile
{
"goalTreeString": "{\"branches\":{\"master\":{\"target\":\"C1\",\"id\":\"master\",\"remoteTrackingBranchID\":\"o/master\"},\"o/master\":{\"target\":\"C1\",\"id\":\"o/master\",\"remoteTrackingBranchID\":null},\"feature1\":{\"target\":\"C3\",\"id\":\"feature1\",\"remoteTrackingBranchID\":null},\"feature3\":{\"target\":\"C4\",\"id\":\"feature3\",\"remoteTrackingBranchID\":null}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"},\"C2\":{\"parents\":[\"C1\"],\"id\":\"C2\"},\"C3\":{\"parents\":[\"C2\"],\"id\":\"C3\"},\"C4\":{\"parents\":[\"C1\"],\"id\":\"C4\"}},\"tags\":{},\"HEAD\":{\"target\":\"feature3\",\"id\":\"HEAD\"},\"originTree\":{\"branches\":{\"master\":{\"target\":\"C7\",\"id\":\"master\",\"remoteTrackingBranchID\":null}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"},\"C5\":{\"parents\":[\"C1\"],\"id\":\"C5\"},\"C6\":{\"parents\":[\"C5\"],\"id\":\"C6\"},\"C7\":{\"paren
@baudm
baudm / ThreeTenTypeAdapters.java
Last active April 9, 2020 13:41
Gson TypeAdapters for JSR-310 backport (org.threeten.bp.**) classes
/*
* Copyright 2016 Darwin Bautista
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@baudm
baudm / linreg.py
Last active February 6, 2018 16:22
EE 298: Linear Regression via Gradient Descent
#!/usr/bin/env python3
import sys
import numpy as np
import matplotlib.pyplot as plt
EPSILON = np.finfo(float).eps
@baudm
baudm / plasma-pre-5.13-compat.patch
Last active April 2, 2020 05:54
latte-dock v0.9.10 compatibility patch for Plasma < 5.13
Index: latte-dock-0.9.10/shell/package/contents/configuration/LatteDockConfiguration.qml
===================================================================
--- latte-dock-0.9.10.orig/shell/package/contents/configuration/LatteDockConfiguration.qml
+++ latte-dock-0.9.10/shell/package/contents/configuration/LatteDockConfiguration.qml
@@ -43,8 +43,6 @@ import "../controls" as LatteExtraContro
FocusScope {
id: dialog
- property alias backgroundMask: backgroundFrameSvgItem.mask
-
@baudm
baudm / update-adlists-pihole-v5.sh
Last active September 1, 2021 14:18
Automated adlist update for PiHole v5
#!/bin/sh
create_sql_dump() {
local list_url="$1"
local sql_dump="$2"
cat >"$sql_dump" <<EOF
BEGIN TRANSACTION;
DELETE FROM 'adlist_by_group';
DELETE FROM 'adlist';