Skip to content

Instantly share code, notes, and snippets.

@adisib
adisib / youtube_hd.user.js
Last active April 30, 2024 23:41
Make youtube videos in HD and automatically resize
// ==UserScript==
// @name Youtube HD
// @author adisib
// @namespace namespace_adisib
// @description Select a youtube resolution and resize the player.
// @version 2024.01.17
// @match https://*.youtube.com/*
// @noframes
// @grant GM.getValue
// @grant GM.setValue
@tjmahr
tjmahr / ordinal.md
Created April 30, 2024 03:55
ordinal-plot-code

How I made the ordinal plot for this paper https://onlinelibrary.wiley.com/doi/10.1111/dmcn.15198

Local .Rprofile detected at C:\Users\Tristan\Documents\WiscRepos\2021-10-hl-vss\.Rprofile

library(tidyverse)

if (FALSE) {
  # Read in the models and make the tribbles for the demo
  draws_epred_means <- targets::tar_read("draws_epred_means")

It seems that it does not matter what timezone is on the server as long as you have the time set right for the current timezone, know the timezone of the datetime columns that you store, and are aware of the issues with daylight savings time.

On the other hand if you have control of the timezones of the servers you work with then you can have everything set to UTC internally and never worry about timezones and DST.

Here are some notes I collected of how to work with timezones as a form of cheatsheet for myself and others which might influence what timezone the person will choose for his/her server and how he/she will store date and time.

MySQL Timezone Cheatsheet

@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active April 30, 2024 23:36
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@alanzchen
alanzchen / DevonThink to Zotero.ipynb
Last active April 30, 2024 23:14
Copying PDFs from DevonThink to their corresponding Zotero items
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@howellcc
howellcc / backupHubitat.sh
Last active April 30, 2024 23:13
Backup script for Hubitat Elevation that runs on Synology NAS
#!/bin/bash
#https://gist.github.com/howellcc/70f5c45a9902f9a3fe4e566ceedf1bca
#This is a backup script that I'm running on my Synology NAS to back up my Hubitat Elevation.
he_login=[Hubitat Username]
he_passwd=[Hubitat Password]
he_ipaddr=[Hubitat IP Address]
backupdir='[Backup Location]' #no trailing space
hubname='Hubitat' #in case you have multiple hubs
@letanure
letanure / estados-cidades.json
Last active April 30, 2024 23:07
JSON estados cidades do brasil, dividido por estados. segunda lista atualizada em 2020, dados do IBGE
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
@sebjvidal
sebjvidal / ViewController.swift
Created April 30, 2024 15:50
Apple Journal Calendar UI Demo
//
// ViewController.swift
// Journal-Calendar-Demo
//
// Created by Seb Vidal on 30/04/2024.
//
import UIKit
class ViewController: UIViewController {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Z-Index Example</title>
<style>
@font-face {
font-family: 'Win95F';
src: url('data:application/font-woff2;base64,d09GMk9UVE8AAB7IAAoAAAAAfLQAAB54AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAADYHcRQZgAIpcATYCJAOFAAQGP21ldGGCBAWHeQcgG/17FeyYl7gdUKg+MzYSIWwchCaAJ1GUTdZM2f+fEtQxhLpXsjlMOBl1rtM5kVqBMp1XeGh4M/bhm1fyGODBICrJYyX3cIpIfVYz8+zf7k/1poo76F5SyxV35u42RuK58Pyzv//2ufiSI5FINEWNWcddrlPZZr353F4vNRtmfpL6FyCmfDO+2gEHHHZoxKaa7jrsXaZOHea+XXQOfP8/9vs9cxcVqniikQnZQ7JE62SzSFJJlfXTq1/snkEVLh3bgX9wrpvZrHU6h4r8an+wJ/mf+G0eKltj8Y0CE6MTzFphsWCV6tY3xQxWaSyijN4a1jYsZYEPgty2j1NBvFO5ztS8L7nCE3R9JjsC1hSKoT3X3uY/v7/vz137WW3kOP6K38nIPwlujGIbNkGXOwLg//99U20JOQ0Yh4DD0LlU0bhPcFDIsBzy6t0Td7+5d9mjCFAJA0VwEQ4h4M07M9/hM0P5S4sBznkkVa5S5dxVIbUt2bl0SRWdWndyVbjrtXoXfWko9Ixf8mAlKsgL1qjQb5oCz6Y4siXFEeB8+MN2upYd8LuBdoR/31iLxhoVBZhAB3bnZRRIIKn3s59aH/bm9DqFEgRElDEz/m5qk9vHmEbteKX0j35isACCAoJ0hS2/QNAEEf