Skip to content

Instantly share code, notes, and snippets.

View CyrusRoshan's full-sized avatar
:shipit:
🚢🚢🚢!

Cyrus Roshan CyrusRoshan

:shipit:
🚢🚢🚢!
View GitHub Profile
{
"title": "Kinesis keyboard setup",
"rules": [
{
"description": "Windows CMD<>OPT swap",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_gui",
@CyrusRoshan
CyrusRoshan / cfworker_verify_cfaccess_jwt.ts
Last active September 9, 2019 14:04 — forked from bcnzer/cloudflareworker-verifyjwt.js
Sample Cloudflare worker that gets a Cloudflare Access JWT, validates it, and returns a result
import * as cookie from 'cookie';
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request));
});
/**
* Fetch and log a request
* @param {Request} request
*/
@CyrusRoshan
CyrusRoshan / .vimrc
Last active January 6, 2018 03:43 — forked from simonista/.vimrc
A basic .vimrc file that will serve as a good template on which to build.
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" Load plugins here
call plug#begin('~/.vim/plugged')
Plug 'octref/rootignore'
@CyrusRoshan
CyrusRoshan / chatserver.go
Created October 27, 2017 02:58
[UNFINISHED] Chat server for backend workshop
package main
import (
"net/http"
"strings"
)
func main() {
http.HandleFunc("/", handler)
http.ListenAndServe(":8000", nil)
@CyrusRoshan
CyrusRoshan / stringformat.go
Last active October 26, 2017 20:05
Some simple string formatting
// Input:
// go run stringformat.go "testing this"
// Output:
// **************
// *TeStInG ThIs*
// *EsTiNg tHiS *
// *StInG ThIs *
// *TiNg tHiS *
// *InG ThIs *
@CyrusRoshan
CyrusRoshan / requestreader.go
Created October 26, 2017 18:33
Simple request reader and poster, with IP Banning, for workshop #1
package main
import (
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
"regexp"
)
@CyrusRoshan
CyrusRoshan / Technical Interview SWE.md
Last active December 21, 2021 18:16
A general overview of how SWE interviews are structured, and tips on how to prep for them
  • Behavioral
    • Least directly-focused section by applicants
    • Can, and should cause you fail a technical interview, if you pass the problem solving portion, but fail this section
    • Questions should focus on, but are not limited to, the following areas:
      • Why do you want to join?
        • Why do you want to join the company?
        • What is it about the role that you'd be taking on that you like?
        • How interested are you?
          • Interested enough to ask questions about what the interviewer does?
  • Interested enough to know a small amount of background info (e.g. a blog post you can ask about)?
@CyrusRoshan
CyrusRoshan / nocgo.go
Last active June 8, 2018 22:11
Restart program without checking for cgo errors
if os.Getenv("GODEBUG") != "cgocheck=0" {
cmd := exec.Command(os.Args[0], os.Args[1:]...)
env := os.Environ()
env = append(env, "GODEBUG=cgocheck=0")
cmd.Env = env
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
err := cmd.Run()
fmt.Println(err)
@CyrusRoshan
CyrusRoshan / godep_zsh_tools.zsh
Last active June 7, 2016 01:24
Zsh functions for making it easy to work with large godeps in production. Add to .zshrc and use in your normal workflow
# Just like regular godep, use at root of repo
godep() {
case $* in
rebuild* ) shift; command rm -rf Godeps && rm -rf vendor && godep save;;
remove* ) shift; command rm -rf Godeps && rm -rf vendor;;
* ) command godep "$@";;
esac
return
}