Skip to content

Instantly share code, notes, and snippets.

View kulak's full-sized avatar

Sergei Gnezdov kulak

View GitHub Profile

The Freenode resignation FAQ, or: "what the fuck is going on?"

IMPORTANT NOTE:

It's come to my attention that some people have been spamming issue trackers with a link to this gist. While it's a good idea to inform people of the situation in principle, please do not do this. By all means spread the word in the communities that you are a part of, after verifying that they are not aware yet, but unsolicited spam is not helpful. It will just frustrate people.

Update 3 (May 24, 2021)

A number of things have happened since the last update.

@ozbillwang
ozbillwang / kubernetes-auto-completion-fish.md
Last active March 28, 2024 18:46
Kubernetes auto-completion works with FISH (better than Bash)
@m-rey
m-rey / fix_pgp_pub_key_not_found.sh
Created March 1, 2019 14:25
Fix: Public Key of Ultimately Trusted Key $key Not Found
#!/bin/bash
gpg --check-trustdb 2>&1| grep 'not found' | awk '{print $8}' >bad-keys.txt
gpg --export-ownertrust > ownertrust-gpg.txt
mv ~/.gnupg/trustdb.gpg ~/.gnupg/trustdb.gpg-broken
for KEY in `cat bad-keys.txt` ; do sed -i "/$KEY/d" ownertrust-gpg.txt ; done
gpg --import-ownertrust ownertrust-gpg.txt
rm bad-keys.txt ownertrust-gpg.txt
@corny
corny / sshtunnel.go
Last active August 27, 2021 22:54 — forked from iamralch/sshtunnel.go
SSH tunnelling in Golang
package main
import (
"fmt"
"io"
"io/ioutil"
"log"
"net"
"os"
@fikovnik
fikovnik / getxkblayout.c
Created February 7, 2018 09:43
Get keyboard layout using X11
// compile with `gcc -I/usr/include getxkblayout.c -lX11 -lxkbfile`
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <X11/XKBlib.h>
#include <X11/extensions/XKBrules.h>
int main(int argc, char **argv) {
Display *dpy = XOpenDisplay(NULL);
@Shourai
Shourai / namecheap SSL.md
Created October 21, 2017 12:49
Letsencrypt SSL certificate with namecheap hosting

source: https://savedlog.com/uncategorized/letsencrypt-ssl-certificate-namecheap-hosting/

The “Positive SSL” certificate I bought along with my domain is invalid with any of my subdomains and cannot be used with wildcards. One annoying thing is that namecheap doesn’t offer auto installation of free let’s encrypt certificates, even though, they are saying “Namecheap is dedicated to data security and privacy for all internet users. We believe the movement to encrypt nearly all web traffic is a positive direction. As more sites embrace HTTPS and use of security products, providers of free SSL are beginning to come online.”

Let me show you what it needs to be done in order to “encrypt nearly all web traffic”.

First, not required but it’s helpful to enable ssh access, it is not enabled by default on the base hosting plans, just go an start a live chat and request ssh access.

@kestein
kestein / Private_Crates.md
Last active September 7, 2024 17:59
Linking to a private repo in Cargo.toml

Under the dependencies section, put

<crate name>={git="ssh://[email protected]/<organization>/<reponame>.git"}

It is pretty similar to a github repo's ssh cloning link, however the : is replaced with a / and ssh:// is prepended to the URL.

[email protected]:my-organization/my-repo.git vs ssh://[email protected]/my-organization/my-repo.git

The SSH URL needs to be used because Cargo is currently unable to handle the authentication prompt that comes up when an HTTPS link is used.
Make sure that the matches the crate name in the target repo's Cargo.toml. The repo name will not override what is in the Cargo.toml if it is a different value.

@aight8
aight8 / react-table.d.ts
Created May 23, 2017 22:29
@types/react-table/index.d.ts
declare module 'react-table' {
const val: ReactTable
export default val
}
declare module ReactTable {
import * as React from 'react'
type AccessorFunction = (row: object) => any
type Accessor = string | string[] | object | AccessorFunction
@atoponce
atoponce / README.md
Last active December 20, 2023 18:39
Security settings for WeeChat

Strongly Recommended

Disable DCC

/plugin unload xfer
/set weechat.plugin.autoload *,!xfer

Disable CTCP

/set irc.ctcp.action ""
/set irc.ctcp.clientinfo ""
/set irc.ctcp.finger ""

/set irc.ctcp.ping ""

@jcberthon
jcberthon / networkmanager-wifi-powersave.md
Last active November 14, 2024 09:21
NetworkManager Wi-Fi powersaving configuration

NetworkManager WiFi Power Saving

NetworkManager supports WiFi powersaving but the function is rather undocumented.

From the source code: wifi.powersave can have the following value:

  • NM_SETTING_WIRELESS_POWERSAVE_DEFAULT (0): use the default value
  • NM_SETTING_WIRELESS_POWERSAVE_IGNORE (1): don't touch existing setting
  • NM_SETTING_WIRELESS_POWERSAVE_DISABLE (2): disable powersave