Skip to content

Instantly share code, notes, and snippets.

View vihanb's full-sized avatar
🐶
Probably at the doggo shelter

Vihan vihanb

🐶
Probably at the doggo shelter
View GitHub Profile
@vihanb
vihanb / .bash_profile
Last active July 29, 2016 22:23
Dotfiles
export [email protected]
export EDITOR=nvim
export TERM=xterm-256color
export CLICOLOR=1
alias v=nvim
alias vi=nvim
alias vim=nvim
# MacPorts
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
@vihanb
vihanb / examples.cdr
Created June 13, 2016 04:43
Cheddar paradigms examples
//@F
IO.printf("Hello, %s!", IO.prompt("Name:", "Please enter your name"))
//@OO
class Greeter(String: name?) {
ask -> self.name = IO.prompt("Name:")
say -> IO.printf("Hello, #{self.name}!")
}
export main() {
const Hello := Greeter::()

Cheddar Grammar

Using WSN

Expression

Expression Definitions:

TypedLiteral = TOKEN ':' (PARENTHESIZED_EXPRESSION | PROPERTY | LITERAL)

| LITERAL .

@vihanb
vihanb / README.md
Last active March 27, 2016 19:39 — forked from schas002/README.md
Expand VSL by forking the gist!

What To Do

Fork the gist, add your own expansion to expansions.txt, then ping @zyabin101 in the Nineteenth Byte chat. Stack Exchange profile required, obviously.

The Rules

  • Be meaningful. Three random words is not good enough.
  • Be funny. This is very subjective, we realize, so try not to take it personally if we don't get it.
  • Be novel. If your expansion starts with "Very" the other two words better be pretty great.
  • Avoid hyphenation.
@vihanb
vihanb / smallcaps.user.js
Created March 9, 2016 03:01
Make everything small caps
// ==UserScript==
// @name Small Caps
// @namespace asdfjeiwofsndalcxzafsd
// @version 1
// @description Make everything small caps
// @author Downgoat
// @match *://*/*
// @grant GM_addStyle
// ==/UserScript==
@vihanb
vihanb / chatbot.js
Last active March 4, 2016 03:25
respond with lmgtfy link
// Chatbot Plugin
function _toConsumableArray(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Talk=function(t){document.getElementById("input").value=t,document.getElementById("sayit-button").click()},Data=function(t,e){return t.replace(/\$([A-Za-z$_]+[A-Za-z$_0-9]*)/g,function(t,n){return e[n]})},Chatbot=function t(e,n,a){void 0===e&&(e="a Chatbot");var r=this,u=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],s=u.Startup,o=void 0===s?"Hi my name is $Name!":s,i=u.UID,l=void 0===i?0:i;_classCallCheck(this,t),this.Name=e,this.Options={Startup:Data(o,this),UID:l},this.onmessage=a||function(){return void 0},this.Queue=[];var c=Symbol("Called");this[c]=new Set,Talk(this.Options.Startup),setInterval(function(){[].concat(_toConsumableArray(document.getElementsByClassName("message"))).filter(function(t,e,n){return r[c].has(t)?!1:(r[c].a
@vihanb
vihanb / stahpwithusernamechanges.user.js
Last active February 27, 2016 17:45
stahp with username changes
// ==UserScript==
// @name stahp with username changes
// @namespace eoisdhfqlkjasdf
// @version 1.0
// @description self explanatory
// @author You
// @match *://*.stackexchange.com/*
// @grant none
// ==/UserScript==
@vihanb
vihanb / chatbeta.user.js
Created February 25, 2016 03:38
removed chat beta logo
// ==UserScript==
// @name No more chat beta!
// @namespace asdjhfkljashdflkjahsdlfkahsdlkjahsdlkf
// @version 0.1
// @description Graduates PPCG Chat
// @author Downgoat
// @match *://http://chat.stackexchange.com/*
// @grant none
// ==/UserScript==
@vihanb
vihanb / downgoat0.jpg
Last active June 12, 2018 19:20
(Up|Down)goat batch 2
downgoat0.jpg
@vihanb
vihanb / downgoat1.jpg
Last active January 1, 2021 13:30
DowngoatUpgoatDowngoatUpgoat
downgoat1.jpg