Skip to content

Instantly share code, notes, and snippets.

View vergenzt's full-sized avatar

Tim Vergenz vergenzt

  • Jacksonville, FL
  • 18:31 (UTC -04:00)
View GitHub Profile
@believer
believer / raycast-jira-to-tana.mjs
Last active May 22, 2024 02:28
Script for Raycast that takes a Jira link, fetches information from Jira's REST API, and converts it to Tana's paste format
#!/usr/bin/env node
// Required parameters:
// @raycast.schemaVersion 1
// @raycast.title Jira fetcher
// @raycast.mode silent
// Optional parameters:
// @raycast.icon 🤖
// @raycast.argument1 { "type": "text", "placeholder": "Jira URL" }
  1. Export data
  2. Unzip
  3. cd facebook-<username>
  4. find . -type f -name '*.json' | xargs -n1 jq -c '. as $input | {} | setpath(input_filename / "/"; $input)'

=> This'll get you to a one-file-per-line stream of JSON objects formatted with the filepath (relative to the export root) as the nested JSON object path. So e.g. a file at ./ads/ad_interests.json containing JSON content:

{
  "topics": [
 "Facebook Messenger",
@tconbeer
tconbeer / install_dbt_from_scratch_on_windows.txt
Created January 4, 2019 21:22
Install DBT from Scratch on Windows
# Any lines preceded by > can be typed or pasted directly into Powershell.
# This has been tested on Windows 10 and dbt v 0.12. Last updated Jan 4, 2019
# Before trying to follow this recipe, you need to set the Execution Policy
# You probably need to do this running Powershell as an admin
> Set-ExecutionPolicy RemoteSigned
# Next install chocolatey:
> iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
@JBaczuk
JBaczuk / addrgen
Created December 15, 2018 20:00
addrgen
#!/bin/bash
echo
echo "Welcome to the Bitcoin address generator!"
echo "input private key (32 bytes, hex format)"
read priv
echo ""
echo "#####################################"
# priv=0C28FCA386C7A227600B2FE50B7CAE11EC86D3BF1FBE471BE89827E19D72AA1D # Testing only
@fnky
fnky / ANSI.md
Last active July 7, 2024 15:39
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@kindlycat
kindlycat / httpie.sh
Created July 19, 2017 19:30
Useful things for work with httpie
# Add this to .bashrc or .zshrc
# Alias for use session with current virtualenv's name or "default".
alias http='http --session=$(basename ${VIRTUAL_ENV:-default})'
# Add header for ajax requests.
httpx() {
http $* X-Requested-With:XMLHttpRequest
}
# Function for login. Get csrf token from header.
@dduvnjak
dduvnjak / .ebextensions--01phantom.config
Last active October 28, 2017 15:25
Elastic Beanstalk configuration file for installing phantomjs globally
files:
"/opt/elasticbeanstalk/nodepath.rb":
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env ruby
require 'json'
cc = "/opt/elasticbeanstalk/deploy/configuration/containerconfiguration"
j = JSON.parse(File.read(cc))
anonymous
anonymous / printersetup.sh
Created March 23, 2015 19:14
GT Printer Setup Script
#!/bin/bash
# Georgia Tech Printer Setup Script
# Compatible with most Linux-based systems
# Requires a recent version of CUPS
# Written by Siddu Duddikunta <siddu@siddu.me>
fail()
{
echo '[FAILED]'
@albertbori
albertbori / Installation.md
Last active July 7, 2024 01:58
Automatically disable Wifi when an Ethernet connection (cable) is plugged in on a Mac

Overview

This is a bash script that will automatically turn your wifi off if you connect your computer to an ethernet connection and turn wifi back on when you unplug your ethernet cable/adapter. If you decide to turn wifi on for whatever reason, it will remember that choice. This was improvised from this mac hint to work with Yosemite, and without hard-coding the adapter names. It's supposed to support growl, but I didn't check that part. I did, however, add OSX notification center support. Feel free to fork and fix any issues you encounter.

Most the credit for these changes go to Dave Holland.

Requirements

  • Mac OSX 10+
  • Administrator privileges