Skip to content

Instantly share code, notes, and snippets.

View dayvonjersen's full-sized avatar

dayvonjersen dayvonjersen

View GitHub Profile
@dayvonjersen
dayvonjersen / slices.c
Created August 15, 2018 17:56
C++ For Go Programmers: Part 2 - Slices
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
struct slice {
size_t type;
int len;
int cap;
POP3:
telnet example.com 110
USER user
PASS pass
STAT
LIST
RETR 1
DELE 1
@dayvonjersen
dayvonjersen / index.html
Created November 4, 2016 17:44
note to self on javascript mvc
<!doctype html>
<html>
<head>
<meta charset='utf-8'>
<title>Index</title>
</head>
<body>
<input type="text" placeholder="gtype suggest">
<ul></ul>
@dayvonjersen
dayvonjersen / preview-vim-colors.sh
Last active November 3, 2016 00:58
Use :TOhtml to see what all your colorschemes look like
#!/bin/bash
#
# preview (neo)vim colors
#
# use "~/.vim/colors" and "vim"
# instead of "~/.config/nvim/colors" and "nvim"
#
# IFF you're a nerd and aren't using neovim yet
#
# usage:
#!/bin/bash
#
# Simple DynDNS Update for afraid.org
# Updated Wed Oct 8 08:00:35 2014
# Updated Tue 21 Jul 2015 06:15:31 AM EDT
# - Uses Bash now!
CURRENT_IP=$(dig +short myip.opendns.com @resolver1.opendns.com)
LAST_IP=$(cat /var/spool/cron/current_ip)
@dayvonjersen
dayvonjersen / README.md
Last active April 19, 2018 00:03
script to update Gogs (gogs.io)

This is a custom script for updating my install of gogs

This script is not officially endorsed by anyone

Use this script at our own risk, etc, etc


My install may differ significantly from your own, so here are some points of note:

@dayvonjersen
dayvonjersen / irc.jl
Created October 24, 2015 05:54
I'm pretty sure this is broken
nick = "tso|bot"
chan = "#test"
introduced = false
irc = connect("localhost",6667)
#irc = connect(6667)
function sendmsg(msg)
write(irc,string(msg,"\n"))
println(msg)
@dayvonjersen
dayvonjersen / rsyslog.conf
Created September 11, 2015 22:44
Write your program's logs to their own file in /var/log with rsyslog
# In order to have your log messages which you wrote to syslog
# e.g. with go's log/syslog package:
#
# import (
# "log"
# "log/syslog"
# )
# //...
# if syslogw, err := syslog.New(syslog.LOG_NOTICE, "myprog"); err == nil {
# log.SetOutput(syslogw)
#!/bin/sh
echo -ne " \033[44m\033[34m4444444444444444444444444444444444444444444\033[0m \n"
echo -ne " \033[44m\033[34m4444444444444444444444444444444444444444444\033[0m \n"
echo -ne " \033[34m;\033[44m444444444444444444444\033[47m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒\033[44m44\033[0m \n"
echo -ne " \033[34m;\033[44m444444444444444444444\033[47m▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒\033[44m44\033[0m \n"
echo -ne " \033[44m\033[34m444444\033[34m4\033[0m\033[47m\033[34m \033[0m\033[44m\033[34m444444444\033[47m▒▒▒▒▒▒▒ \033[47m\033[34m▒▒▒▒▒\033[44m44\033[0m \n"
echo -ne " \033[44m\033[34m444444\033[34m4\033[0m\033[47m; \033[0m\033[44m\033[34m444444444\033[47m▒▒▒▒▒▒▒\033[47m\033[34m \033[47m\033[34m▒▒▒▒▒\033[44m44\033[0m \n"
echo -ne " \033[44m\033[34m444444\033[34m4\033[0m\033[47m; \033[0m\033[47m:\033[0m\033[44m\033[34m44444444\033[
#!/bin/sh
echo -ne " \033[47m\033[1;34m4444444444444444444444444444444444444444444\033[0m \n"
echo -ne " \033[47m\033[1;34m4444444444444444444444444444444444444444444\033[0m \n"
echo -ne " \033[1;34m;\033[47m44444444444444444444444444444444444444444\033[0m \n"
echo -ne " \033[1;34m;\033[47m444444\033[0m\033[47m\033[34m4444444\033[1;34m444444444444444\033[0m\033[47m\033[34m4444444\033[1;34m444444\033[0m \n"
echo -ne " \033[47m\033[1;34m444444\033[0m\033[47m\033[34m4:\033[1;34m::::\033[0m\033[47m\033[34m4\033[1;34m444444444444444\033[0m\033[47m\033[34m4\033[1;34m:::::\033[0m\033[47m\033[34m4\033[1;34m444444\033[0m \n"
echo -ne " \033[47m\033[1;34m444444\033[0m\033[47m\033[34m4; \033[0m\033[47m\033[34m4\033[1;34m44444444444444\033[0m\033[47m\033[34m4\033[1;34m; ;\033[0m\033[47m\033[34m4\033[1;34m444444\033[0m \n"
echo -ne "