Skip to content

Instantly share code, notes, and snippets.

View daryltucker's full-sized avatar

Daryl Tucker daryltucker

  • Neo-Retro Group
  • Salem, Or
View GitHub Profile
@ABelliqueux
ABelliqueux / fixbuild.patch
Created April 1, 2022 13:57
AUR-java8-openjfx-fixbuild.patch
--- rt-8u202-ga/build.gradle 2018-12-10 17:30:22.000000000 +0100
+++ rt-8u202-ga/build1.gradle 2022-04-01 15:47:37.791321075 +0200
@@ -737,24 +737,10 @@
// Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
//
// We need to parse the second line
-def inStream = new java.io.BufferedReader(new java.io.InputStreamReader(new java.lang.ProcessBuilder(JAVA, "-version").start().getErrorStream()));
-try {
- if (inStream.readLine() != null) {
- String v = inStream.readLine();
@ktosiek
ktosiek / PA profile-set astro-a50-gen4.conf
Last active February 27, 2024 22:46
Astro A50 support on Linux - basic configuration for PulseAudio 13 (tested on Ubuntu's 13.99.1). Install the files and reboot, to make sure udev and PA reloaded :-)
; /usr/share/pulseaudio/alsa-mixer/profile-sets/astro-a50-gen4.conf
[General]
auto-profiles = yes
[Mapping analog-voice]
description = Voice
device-strings = hw:%f,0,0
channel-map = left,right
paths-output = steelseries-arctis-output-chat-common
@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@RNHTTR
RNHTTR / AzureUploadLargeBlob.sh
Last active February 23, 2024 19:35
A simple shell script using cURL and the Azure REST API to upload large files (> 100MB) to Azure Storage
#!/bin/bash
echo "\nEnter your storage account name:"
read AZ_ACCOUNT_NAME
echo "\nEnter your container name:"
read AZ_BLOB_CONTAINER
echo "\nEnter your SAS token (just hit ENTER/RETURN if not applicable):"
read AZ_SAS_TOKEN
DATE_NOW=$(date -Ru | sed 's/\+0000/GMT/')
@ArtBIT
ArtBIT / glados.sh
Last active April 13, 2021 17:12
GLaDOS eSpeak
random_pitch() {
local delta=${1:-50}
local value=$(( ($RANDOM % $delta) - $delta/2 ))
echo "+${value}" | sed 's/+-/-/'
}
glados() {
local pitch=70
local speed=180
local lang=en
@codenamezjames
codenamezjames / flatten.js
Created January 1, 2019 16:15
Javascript flatten similar to ruby's flatten
function flatten(arr, depth = Infinity, result = []) {
if(!Array.isArray(arr)) return null
for (const value of arr) {
if (depth > 0 && Array.isArray(value)) {
if (depth > 1) {
flatten(value, depth - 1, result)
} else {
result.push(...value)
}
} else {
We can't make this file beautiful and searchable because it's too large.
date,title,artist,peak_pos,last_pos,weeks,rank,change,video_link,genre,broad_genre,energy,liveness,tempo,speechiness,acousticness,instrumentalness,time_signature,danceability,key,duration_ms,loudness,valence,mode,lyrics,polarity
6/21/18,All Girls Are The Same,Juice WRLD,41,49,5,41,8,,rap,,0.529,0.0856,161.989,0.307,0.0769,0.000335,4,0.671,0,165820,-7.226,0.203,1,theyre rotting my brain love \ these hoes are the same \ \ i admit it another ho got me finished \ broke my heart oh no you didnt \ fuck sippin ima down a whole bottle \ hard liquor hard truth cant swallow \ need a bartender put me out of my sorrow \ wake up the next day in the monte carlo \ with a new woman tell me she from colorado \ and she love women shell be gone by tomorrow \ who am i kiddin \ all this jealousy and agony that i sit in \ im a jealous boy really feel like john lennon \ i just want real love guess its been a minute \ pissed off from the way that i dont fit in i dont fit in \ tell me whats the secret to love i dont get it \ feel li
@yellowcrescent
yellowcrescent / k8s-coreos-setup.md
Last active December 17, 2018 21:32
CoreOS Kubernetes cluster setup at Digitalocean

Notes on setting up a Kubernetes cluster on CoreOS (stable) with DigitalOcean's platform.

Partially stolen from this guide by kevashcraft

Spin up VMs

  • Spin up 4 VMs with CoreOS Stable. One will be the master, the other 3 will be workers
  • Tag them with k8s:master and k8s:worker respectively, along with a tag for the cluster
  • Droplets can be created via your DO control panel, or by using doctl. Just change the CLUSTER_NAME, CLUSTER_DOMAIN, and SSHKEY_ID values below to match your own, then save the file to cluster_create.sh, chmod +x cluster_create.sh, then run it ./cluster_create.sh. If you don't already have doctl setup, it will probably be easier to just do this from the DO control panel if you only need to do a one-time setup for development.
@yellowcrescent
yellowcrescent / amazon_total.py
Last active June 20, 2018 17:58
Calculate total Amazon spending from Order Report
#!/usr/bin/env python
# vim: set ts=4 sw=4 expandtab:
"""
amazon_total.py
Calculate total cost of Amazon orders
Usage:
- Login to your Amazon account, then click on 'Download order reports'
Choose the time period, and Amazon will generate a CSV file for you.
@yellowcrescent
yellowcrescent / nginx_sockuser.diff
Last active April 4, 2019 23:12
add sock_user, sock_group, sock_perm options to nginx listen directive
diff -r 72d3aefc2993 src/core/ngx_connection.c
--- a/src/core/ngx_connection.c Wed Jul 26 13:13:51 2017 +0300
+++ b/src/core/ngx_connection.c Fri Jul 28 22:39:23 2017 -0400
@@ -87,6 +87,12 @@
ls->fastopen = -1;
#endif
+#if (NGX_HAVE_UNIX_DOMAIN)
+ ls->sock_user = -1;
+ ls->sock_group = -1;