Skip to content

Instantly share code, notes, and snippets.

@alexellis
alexellis / GUIDE.md
Last active July 31, 2023 10:51
Equinix Metal is my computer

From my blog post: The Internet is my computer

Equinix Metal is my computer

Run hosted VSCode on Equinix Metal's huge: AMD Epyc instances with 64GB RAM and 24 Cores, coupled with a bonded 2 x 10 Gbps uplink to the Internet.

Hosted VSCode

  • Provision your Ubuntu 20.04 LTS server using the dashboard and add your SSH key
  • Once you have the public IP, log in over SSH
@brenopolanski
brenopolanski / file-upload.tsx
Created May 5, 2021 00:37 — forked from Sqvall/file-upload.tsx
File Upload with Chakra UI and react-hook-form
import { ReactNode, useRef } from 'react'
import { Button, FormControl, FormErrorMessage, FormLabel, Icon, InputGroup } from '@chakra-ui/react'
import { useForm, UseFormRegisterReturn } from 'react-hook-form'
import { FiFile } from 'react-icons/fi'
type FileUploadProps = {
register: UseFormRegisterReturn
accept?: string
multiple?: boolean
children?: ReactNode
@lg
lg / adding-tailscale-to-edgerouter.md
Last active April 11, 2024 07:44
Add tailscale to an EdgeRouter and surviving system upgrade

Adding tailscale to an EdgeRouter (and surviving system upgrades)

I suggest you run sudo bash on all of these so you're the root user.

Installing

  1. Download tailscale and put the files in /config/. Find the latest stable or unstable version for your EdgeRouter's processor (ex. ER4 is mips and ERX is mipself)
sudo bash    # if you havent already
@senseab
senseab / calico.yaml
Last active October 22, 2023 12:36
deploy calico in k3s
# Usage in k3s
# set k3s server with `--flannel-backend=none --disable-network-policy --service-cidr=10.43.0.0/16,fd01::00/112`
# restart all k3s component, containerd included.
# use this manifest with `kubectl apply -f <manifest>
# set `net.ipv6.conf.all.forwarding=1` and `net.ipv4.conf.all.forwarding=1` via sysctl
# ALL done.
---
# Source: calico/templates/calico-config.yaml
# This ConfigMap is used to configure a self-hosted Calico installation.
kind: ConfigMap
@aveao
aveao / bird1-bird-vultr.conf
Last active May 17, 2024 03:20
BIRD 1 and 2 configs for BGP stuffs (HE Tunnelbroker, Vultr etc)
router id [our IPv4];
protocol bgp vultr
{
local as [our ASN];
source address [our IPv4 from vultr];
import all;
export filter {
if net ~ [[the IPv4 block we want to announce]] then accept;
reject;
@dgoujard
dgoujard / index.php
Created April 8, 2018 15:36
PHP Guzzle <-> Docker socket connector
<?php
//php composer.phar require guzzlehttp/guzzle:~6.0
//php composer.phar require php-http/socket-client
//php composer.phar require php-http/message
//php composer.phar require php-http/client-common
require 'vendor/autoload.php';
use GuzzleHttp\Psr7\Uri;
use Http\Client\Common\Plugin\AddHostPlugin;
@jamesmacwhite
jamesmacwhite / Workarounds for Netflix and the blocking of IPv6 tunnels.md
Last active May 6, 2024 09:00
Prevent proxy/VPN streaming error messages from Netflix when using a Hurricane Electric IPv6 tunnel.

Workarounds for Netflix and the blocking of Hurricane Electric IPv6 tunnels

The dreaded "You seem to be using an unblocker or proxy." error message. Cool story bro.

This gist was essentially created out of my own rant about Netflix being hostile to IPv6 tunnel services since June 2016. You are welcome to read my opinion on the matter, this is the more technical side to the issue and how to combat it within your own network.

Since I wrote this, various GitHub users have contributed their thoughts and ideas which has been incorporated into this gist. Thank you to everyone who have contributed their own methods and implementations.

The problem

Netflix now treats IPv6 tunnel brokers (such as Hurricane Electric) as proxy servers. A while ago it became apparent to users and Netflix that somewhat by accident, IPv6 tunnel users were being served content outside of their geolocation because of the way Netflix was identifyi

***
*** Inscrivez vous aux webinaires 2017 : https://attendee.gotowebinar.com/register/7239291589398918401
***
Webinaire "Présentation des principaux services AWS" :
https://www.youtube.com/watch?v=FC--jteXU_8
http://www.slideshare.net/JulienSIMON5/presentation-des-services-aws
Webinaire "Modèle de sécurité AWS" :
https://www.youtube.com/watch?v=1QeKH-5nTIc
@jeanfbrito
jeanfbrito / influxdb.lua
Created January 6, 2016 18:41
NodeMCU and InfluxDB
-- Your access point's SSID and password
local SSID = "greenhouse"
local SSID_PASSWORD = "senhasupersecreta"
local DEVICE = "device001"
local temperature = 27.5
-- configure ESP as a station
wifi.setmode(wifi.STATION)
wifi.sta.config(SSID,SSID_PASSWORD)
wifi.sta.autoconnect(1)
#!/usr/bin/sudo sh
## ruby_revealer.sh -- decrypt obfuscated GHE .rb files. 2.0.0 to 2.3.1+.
## From `strings ruby_concealer.so`:
##
## > This obfuscation is intended to discourage GitHub Enterprise customers
## > from making modifications to the VM.
##
## Well, good, as long as its not intended to discourage *me* from doing this!