Skip to content

Instantly share code, notes, and snippets.

View nogweii's full-sized avatar
🍀

Nogweii nogweii

🍀
View GitHub Profile
@nogweii
nogweii / ddg_bangs.rb
Created May 23, 2014 23:17
get a list of all of duckduckgo's bangs in a programmatic manner, useful for scripting
require 'nokogiri'
require 'open-uri'
require 'json'
require 'yaml'
f = open('https://duckduckgo.com/bang.html', {"User-Agent" => 'Ruby script parsing the full list of bangs/1.0 ; http://evaryont.me'}).read
n = Nokogiri.parse(f)
class DDGBang < Struct.new(:category, :group, :bang, :aliases, :full_name)
def to_json(*)
@nogweii
nogweii / sysctl.changed.conf
Created February 22, 2012 20:30
A massive collection of various sysctl files, designed for drop-in CCDC fixing
fs.file-max = 65535
fs.inode-max = 32768
fs.suid_dumpable = 0
kernel.core_uses_pid = 1
kernel.exec-shield = 1
kernel.maps_protect = 1
kernel.msgmax = 65536
kernel.msgmnb = 65536
kernel.panic = 30
kernel.panic_on_oops = 30
@nogweii
nogweii / github_starred.gql
Created September 18, 2019 06:41
GraphQL query for Github to get N recently starred repos, along with their langauges/topics
query RecentlyStarredRepos($numRepos: Int, $cursor: String) {
viewer {
starredRepositories(last: $numRepos, before: $cursor) {
edges {
starredAt
cursor
node {
id
name
description
@nogweii
nogweii / status_play.gql
Created September 18, 2019 06:16
Github GraphQL query to change your Github status
query GetCurrentStaus {
viewer {
login
status {
emoji
message
}
}
}
@nogweii
nogweii / xmas_tree.rb
Created December 22, 2018 20:50 — forked from mehdi-farsi/xmas_tree.rb
A light-up christmas tree in your terminal
class ChristmasTree
FIRST_LINE_LENGTH = 1
LEVEL_HEIGHT = 3
COLORS = ["\033[0m", "\033[0m", "\033[0m", "\033[31m", "\033[33m", "\033[32m", "\033[34m"] # red, yellow, blue
def initialize(levels)
@levels = levels.to_i < 1 ? 3 : levels.to_i
@last_line_length = 5 + ((@levels - 1) * 2)
@current_line_length = FIRST_LINE_LENGTH
end
@nogweii
nogweii / telegraf-1.5.1-sqlserver-stats.txt
Created July 20, 2018 21:33
telegraf --test --input-filter=sqlserver runs
* Plugin: inputs.sqlserver, Collection 1
> Log\ size\ (bytes),host=devsqldist,environment=Development,owner=$MACHINE_OWNER,role=$MACHINE_ROLE,type=Database\ size,servername=DEVSQLDIST,source=sqlserver model=8388608i,Repl_Counters=8388608i,ReportServer=8388608i,ReportServerTempDB=8388608i,Test=8388608i,tempdb=142606336i,msdb=20578304i,distribution=143654912i,master=2097152i 1532122345000000000
> Rows\ size\ (bytes),role=$MACHINE_ROLE,host=devsqldist,type=Database\ size,servername=DEVSQLDIST,source=sqlserver,environment=Development,owner=$MACHINE_OWNER distribution=550502400i,model=8388608i,msdb=30474240i,tempdb=301989888i,ReportServerTempDB=8388608i,ReportServer=8388608i,Repl_Counters=8388608i,Test=8388608i,master=4653056i 1532122345000000000
> Rows\ size\ (8KB\ pages),role=$MACHINE_ROLE,servername=DEVSQLDIST,type=Database\ size,source=sqlserver,host=devsqldist,environment=Development,owner=$MACHINE_OWNER ReportServer=1024i,ReportServerTempDB=1024i,tempdb=4096i,distribution=67200i,msdb=3720i,Test=1024i,master=
############## Kodi CRASH LOG ###############
################ SYSTEM INFO ################
Date: Mon May 28 01:10:39 UTC 2018
Kodi Options:
Arch: x86_64
Kernel: Linux 4.16.11-1-ARCH #1 SMP PREEMPT Tue May 22 21:40:27 UTC 2018
Release: Arch Linux
############## END SYSTEM INFO ##############
@nogweii
nogweii / README.md
Created February 17, 2010 23:23
Add your ssh keys into memory only when you need to.
@nogweii
nogweii / gist:8278021
Last active November 25, 2017 06:34
PageKite configuration for running your own front-end (broken, sorta)
# /etc/pagekite/20_frontend.rc on kites.evaryont.me
# Front-end selection
#
# Front-ends accept incoming requests on your behalf and forward them to
# your PageKite, which in turn forwards them to the actual server.
# Running my own front-end!
isfrontend
@nogweii
nogweii / README.md
Last active November 10, 2017 00:55
Private cloud, a description

So, a private cloud.

What to include in said cloud?

Well, let's start with another cloud, [Sovereign][]:

  • IMAP over SSL via Dovecot, complete with full text search provided by Solr.
  • POP3 over SSL, also via Dovecot
  • SMTP over SSL via Postfix, including a nice set of DNSBLs to discard spam before it ever hits your filters.