Skip to content

Instantly share code, notes, and snippets.

View faun's full-sized avatar
🌵

Faun faun

🌵
View GitHub Profile
@ruanbekker
ruanbekker / tree_style_tab_firefox.md
Created November 28, 2019 06:18
Hide Native Tabs with Tree Style Tabs for Firefox
1="Unsupported protocol. This build of curl has no support for this protocol."
2="Failed to initialize."
3="URL malformed. The syntax was not correct."
4="A feature or option that was needed to perform the desired request was not enabled or was explicitly disabled at build-time. To make curl able to do this, you probably need another build of libcurl!"
5="Couldn't resolve proxy. The given proxy host could not be resolved."
6="Couldn't resolve host. The given remote host was not resolved."
7="Failed to connect to host."
8="Weird server reply. The server sent data curl couldn't parse."
9="FTP access denied. The server denied login or denied access to the particular resource or directory you wanted to reach. Most often you tried to change to a directory that doesn't exist on the server."
10="FTP accept failed. While waiting for the server to connect back when an active FTP session is used, an error code was sent over the control connection or similar."
@jeromedalbert
jeromedalbert / .gitattributes
Last active March 14, 2025 14:16
Automatically resolve Git merge conflicts in Rails schema.rb by picking the most recent date in the conflict (now works with Rails 5 and recent versions of Git). The following files should be in your home ~ directory. Inspired by https://tbaggery.com/2010/10/24/reduce-your-rails-schema-conflicts.html
db/schema.rb merge=railsschema

VIM-GO

Plugin https://github.com/fatih/vim-go
Tutorial https://github.com/fatih/vim-go-tutorial
Vimrc https://github.com/fatih/dotfiles/blob/master/vimrc

Run

Commands

  • File :GoRun %
  • Package :GoRun
  • Debug :GoDebugStart
@rwuwon
rwuwon / mosh.md
Last active December 3, 2024 08:59
Connect to a Google Cloud Compute Engine using Mosh (mobile shell)

Connect to a Google Cloud Compute Engine using Mosh (mobile shell)

Mosh is a great way to overcome lag and flakey connection issues when accessing remote terminals over SSH: https://mosh.org/

Unfortunately, there's still not a lot of clear documentation for "idiots" because a lot of the existing guides assume a) "it just works", or b) you're already skilled enough to set everything up from scratch (assumed knowledge/use cases).

One of the problems I ran into for quite a long time yesterday was getting the darn thing to connect to my Google Cloud instance. I kept running into the mosh: Nothing received from server on UDP port 60001. [To quit: Ctrl-^ .] error (by the way - to quit, you have to press . after Ctrl-^ - it's not just Ctrl-^, there is a dot there too!)

FAQs and the like made vague spartan references to NATs, firewalls, iptables and the like and I tried out various commands and configurations on the se

@nikmd23
nikmd23 / TransformStream.js
Last active April 9, 2020 20:57
Basic Implementation of a Transform (Pass-through) Stream
function TransformStream() {
var readableController,
writableController,
readable = new ReadableStream({
start(controller) {
readableController = controller;
},
cancel(reason) {
writableController.error(reason);
}
@ahmetb
ahmetb / gcrgc.sh
Last active March 10, 2025 21:51
Script to clean up Google Container Registry images pushed before a particular date
#!/bin/bash
# Copyright © 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
unless ENV['RAILS_ENABLE_TEST_LOG']
config.logger = Logger.new(nil)
config.log_level = :fatal
end
@tj
tj / main.go
Last active April 10, 2017 06:58
package main
import (
"fmt"
"net/http"
"github.com/apex/go-apex"
"github.com/apex/go-apex/proxy"
)