Skip to content

Instantly share code, notes, and snippets.

@brentjanderson
brentjanderson / Howto.md
Created February 20, 2018 17:55
SSH Tunneling with Firefox

Sometimes it is useful to route traffic through a different machine for testing or development. At work, we have a VPN to a remote facility that we haven't bothered to fix for routing, so the only way to access a certain machine over that VPN is via an SSH tunnel to a machine that is reachable over the VPN. Other times, I have used this technique to test internet-facing requests against sites I am developing. It is pretty easy, and if you don't use firefox regularly, you can treat Firefox as your "Proxy" browser and other browsers can use a normal configuration (Although you can also configure an entire system to use the proxy, other articles exists that discuss this potential).

  1. Open a terminal
#!/bin/bash
iatest=$(expr index "$-" i)
#######################################################
# SOURCED ALIAS'S AND SCRIPTS BY zachbrowne.me
#######################################################
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
@yudistiraashadi
yudistiraashadi / supabase_sync.md
Last active May 3, 2024 09:05
Sync supabase online - local - self host (3 way)

1. Requirement

  • Terdapat Supabase instance di online / local / self host (salah satu)
  • Ter install node.js serta Docker pada mesin local

Β 

2. Sync ke local

Step ini dilakukan apabila supabase ada di online / self host. Step ini dapat di skip apabila sudah ada di local.

  • Pada directory yang anda inginkan, run npx supabase init untuk setup supabase folder dan config.
@dipankardas011
dipankardas011 / main.go
Last active May 3, 2024 09:05
Without kubernetes service exposed how to get http client connect?
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io"
"log"
"net/http"
"os"
@yudistiraashadi
yudistiraashadi / supabase_sync_sat_set.md
Created May 3, 2024 09:01
Sync Supabase command e tok

RUN DI LOCAL:

  1. npx supabase init untuk setup supabase folder dan config.
  2. npx supabase start untuk setup Docker (download docker image + setup)
  3. npx supabase db diff -f initial_structure --db-url [connection-string-asal]
  4. npx supabase db diff -f initial_structure --db-url [connection-string-asal] --schema auth,storage
  5. npx supabase db dump --data-only -f supabase/seed.sql --db-url [connection-string-asal]
  6. npx supabase db reset --db-url [connection-string-tujuan]
@rwightman
rwightman / median_pool.py
Last active May 3, 2024 09:03
PyTorch MedianPool (MedianFilter)
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.modules.utils import _pair, _quadruple
class MedianPool2d(nn.Module):
""" Median pool (usable as median filter when stride=1) module.
@rxaviers
rxaviers / gist:7360908
Last active May 3, 2024 09:03
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@mlen
mlen / flac2alac
Last active May 3, 2024 09:00
FLAC to ALAC converter. Requires Mac OS X and `flac` binary installed (ie. via Homebrew: `brew install flac`).
#!/usr/bin/env bash
set -e
convert_to_alac() {
flac="$1"
aiff="${flac%.*}.aiff"
alac="${flac%.*}.m4a"
flac -s -d --force-aiff-format -o "$aiff" "$flac"
afconvert -f m4af -d alac "$aiff" "$alac"
vSphere 6 Enterprise Plus:
1C20K-4Z214-H84U1-T92EP-92838
1A2JU-DEH12-48460-CT956-AC84D
MC28R-4L006-484D1-VV8NK-C7R58
5C6TK-4C39J-48E00-PH0XH-828Q4
4A4X0-69HE3-M8548-6L1QK-1Y240
vSphere with Operations Management 6 Enterprise:
4Y2NU-4Z301-085C8-M18EP-2K8M8
1Y48R-0EJEK-084R0-GK9XM-23R52
@squarism
squarism / iterm2.md
Last active May 3, 2024 08:58
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab ⌘ + T
Close Tab or Window ⌘ + W (same as many mac apps)
Go to Tab ⌘ + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction ⌘ + Option + Arrow Key
Cycle iTerm Windows ⌘ + backtick (true of all mac apps and works with desktops/mission control)