Skip to content

Instantly share code, notes, and snippets.

@aolinto
aolinto / isobaths.R
Created August 27, 2018 13:04
Create isobaths and smoothed isobaths based on Etopo1 data
# ====================================================================
# Create isobaths and smoothed isobaths based on Etopo1 data
# https://maps.ngdc.noaa.gov/viewers/wcs-client/
# author: Antônio Olinto Ávila da Silva
# creation: 2018-08-27
# last edition: 2018-08-27
# ====================================================================
# workspace
# ----------
@eo1989
eo1989 / pet-snippet.toml
Created November 15, 2023 16:50 — forked from varenc/pet-snippet.toml
description
[[snippets]]
description = "start dev file syncer. uses fswatch to know when to run rsync. does not sync .git file. Sort like a write-through cache network file system with only eventual consistency guarantees."
command = "fswatch -0 --exclude \"\\.git\" --exclude \"\\.xml\" --exclude \"___\" -o /Users/chris/Documents/workspace/lingt_chris_dev_rsync_checkout/myproject | xargs -0 -n 1 -I {} rsync --progress --exclude '*.pyc' --exclude '*.git' --recursive ~/workspace/lingt_chris_dev_rsync_checkout/myproject dev@dev.server:/home/user/webapps/dev_chris/myproject"
output = ""
[[snippets]]
description = "plex find unscanned tv!"
command = "cat <(find /Users/chris/Downloads/media/dbx_mount/tv -type f | sed 's/.*\\///' | grep 'mp4\\|mkv\\|avi') <(unbuffer /Applications/Plex\\ Media\\ Server.app/Contents/MacOS/Plex\\ Media\\ Scanner -c 4 --tree | grep 'mp4\\|mkv\\|avi' | sed 's/.*\\///' | sed 's/\\w*\\[.*\\]$//' | awk '{$1=$1};1') | sort | uniq -u"
output = ""
@agyild
agyild / FSR.glsl
Last active May 2, 2024 17:42
AMD FidelityFX Super Resolution v1.0.2 for mpv
// Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved.
//
// 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
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
@aolinto
aolinto / COPERNICUS_Multiobs_3d.R
Created August 3, 2019 19:12
R script to extract COPERNICUS Temperature and Salinity statistics from a nc file based on a polygon
# Antonio Olinto Avila-da-Silva, Instituto de Pesca, Brasil
# https://gist.github.com/aolinto/9d9514eb453109425f5b35c42fa0eb95
# script to process COPERNICUS Sea Surface Salinity
# product MULTIOBS_GLO_PHY_REP_015_002
# nc file downloaded from
# http://marine.copernicus.eu/services-portfolio/access-to-products/?option=com_csw&view=details&product_id=MULTIOBS_GLO_PHY_REP_015_002
# dataset-armor-3d-rep-monthly
# the script will transform nc file to brick raster, read temperature and salinity data
# for a given area and depth, compute its statistics and write them into
# a single csv file named COPERNICUS_to.csv or COPERNICUS_so.csv
@devfraga
devfraga / readme.md
Last active May 2, 2024 17:41
README para os projetos pessoais

Logo do projeto

Nome do Projeto

Uma breve descrição do projeto aqui.

🔥 Introdução

Coloque aqui as instruções e quais são os objetivos desse projeto, funcionalidades.

@SorenSaket
SorenSaket / main.odin
Last active May 2, 2024 17:40
GLFW, OpenGL Window Tutorial in Odin language
// GLFW and OpenGL example with very verbose comments and links to documentation for learning
// By Soren Saket
// semi-colons ; are not requied in odin
//
// Every Odin script belongs to a package
// Define the package with the package [packageName] statement
// The main package name is reserved for the program entry point package
// You cannot have two different packages in the same directory
@terickson001
terickson001 / main.odin
Last active May 2, 2024 17:40
vulkan-tutorial example in Odin
import "shared:shaderc"
import "vendor:glfw"
import vk "vendor:vulkan"
MAX_FRAMES_IN_FLIGHT :: 2
Context :: struct
{
instance: vk.Instance,

For Windows 10, change these keys in regedit:

  • Computer\HKEY_CLASSES_ROOT\SystemFileAssociations\text\shell\edit\command
  • Computer\HKEY_CLASSES_ROOT\SystemFileAssociations\text\shell\open\command
  • Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\batfile\shell\edit\command
  • Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\cmdfile\shell\edit\command

From: %SystemRoot%\system32\NOTEPAD.EXE %1 To: "%ProgramFiles%\Sublime Text 3\sublime_text.exe" "%1" Or: "%ProgramFiles%{insert-path-to-fave-editor}" "%1"

@willjobs
willjobs / ynab-google-sheets.js
Last active May 2, 2024 17:36 — forked from notself/ynab-google-sheets.js
Revisions to the original gist to add columns, show split subtransactions on multiple rows by default, fix time discrepancies, and add an indicator of the last data pull
function YNABAccounts(accessToken, budgetId) {
const accounts = _getBudgetAccounts(accessToken, budgetId);
if(accounts == null) {
return null;
}
const columns = ["Name", "Type", "Budget", "Closed", "Balance"];
const rows = accounts.map(function (acc) {
return [
BLACK => "\033[30m",
RED => "\033[31m",
GREEN => "\033[32m",
YELLOW => "\033[33m",
BLUE => "\033[34m",
PURPLE => "\033[35m",
CYAN => "\033[36m",
WHITE => "\033[37m",
# background color