Skip to content

Instantly share code, notes, and snippets.

View beatcracker's full-sized avatar
🚝
Blaine the Mono

beatcracker

🚝
Blaine the Mono
View GitHub Profile
@jonmorehouse
jonmorehouse / tar.go
Created February 17, 2014 22:29
Quick golang script for creating a gzipped tarball
package main
import (
"os"
"archive/tar"
"log"
"io"
"compress/gzip"
)
@naodesu
naodesu / update-antizapret
Last active December 20, 2016 12:25
Скрипт для получения списков запрещённых URL через API сайта antizapret.info и генерации серверного конфига для openvpn.
#!/bin/sh
CONF=/etc/openvpn/home/client-config/DEFAULT
IP_URL=http://api.antizapret.info/group.php
trap cleanup EXIT
cleanup() {
rm $NEW_CONF 2>/dev/null
}
@jsomers
jsomers / android-websters.md
Last active April 20, 2024 01:15
Instructions for using Webster's 1913 on Android

To use Webster's 1913 dictionary on Android, install Colordict 3, an app that accepts this StarDict format. https://play.google.com/store/apps/details?id=com.socialnmobile.colordict

Next download James's S3 archive. https://s3.amazonaws.com/jsomers/dictionary.zip

You will need to extract the .dict file from inside three containers - .dz, .tar, .bz2 from innermost to outermost. 7zip handles all of these formats.

Place the .dict, .idx and .ifo files in the dictdata directory on your sdcard or local storage root. This is where colordict looks for dictionaries.

When the files are in the right place, you can run Colordict and tap the folder icon in the top right to see the dictionaries installed and set the dictionary priority. I put the 1913 dictionary above the defaults "Wordnet" and "Wikipedia." When you look up a word, ColorDict shows the definition, if available, from these multiple sources.

@KirkMunro
KirkMunro / PowerShell.Signed.gitattributes
Last active February 15, 2023 10:24
.gitattributes file contents for PowerShell script or manifest modules (signed or unsigned) and binary modules
# Treat all files in this project as binary. This enables atomic
# checkins (no merges, these are signed files) and it preserves
# CRLF line endings
* binary
@xDShot
xDShot / vk_ublock.txt
Last active June 3, 2019 19:50
uBlock filters to remove ads in vk.com. Just paste these lines into your filters.
vk.com##div[data-ad-view]
vk.com##div[data-ad]
vk.com##div[data-ads]
vk.com##.ads_ads_box
vk.com##.ads_ads_news_wrap
mkfs.vfat -n config-2 -I /dev/sdc
mkdir -p /media/config-drive
mount /dev/sdc /media/config-drive
mkdir -p /media/config-drive/openstack/latest
cp cloud-config.yml /media/config-drive/openstack/latest/user_data
umount /media/config-drive

NOTE mkfs.vfat is provided by the dosfstools package

@AGWA
AGWA / isolated_openvpn_routes.md
Last active September 11, 2019 22:53
Isolated OpenVPN routing table on Linux

Save the route script to /usr/local/lib/openvpn/route on the client. Make it executable with chmod +x.

Remove the push redirect-gateway option from the OpenVPN server config.

Add these options to the OpenVPN client config:

setenv OPENVPN_ROUTE_TABLE 94
route-noexec
route-up /usr/local/lib/openvpn/route
route 0.0.0.0 128.0.0.0
@nextrevision
nextrevision / example-rancher-metadata-tree
Last active February 24, 2018 17:53
Example traversed tree of the Rancher metadata service
/containers
/containers/0
/containers/0/create_index :
/containers/0/health_state :
/containers/0/host_uuid : da4aa4b0-ee2f-4ad3-8ded-b09917821cfa
/containers/0/hostname : dockermachine
/containers/0/ips
/containers/0/ips/0 : 10.42.176.231
/containers/0/labels
/containers/0/name : Network Agent
@gorhill
gorhill / gist:ef1b62d606473c68d524
Last active February 16, 2023 21:17
Disqus comments widget: on-demand
! Title: Disqus click-to-load
# Copy-paste the static filters below into your "My filters" pane in the
# dashboard.
# Purpose is to load Disqus comments on demand only, so that no connection
# to `disqus.com` occurs by default when you land on a site which uses
# Disqus comments widget.
# Not connecting to Disqus by default is a good thing for such a
# ubiquitous server as `disqus.com`, which can be used to build a
@Xainey
Xainey / PowerShell.svg
Created January 1, 2017 22:02
SVG Vector for PowerShell logo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.