Skip to content

Instantly share code, notes, and snippets.

View senchabot-github's full-sized avatar

Senchabot senchabot-github

View GitHub Profile
@miketahani
miketahani / web-servers.md
Created May 26, 2020 03:31 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
const radians = deg => deg * Math.PI / 180
// @param {Number} z Offset from radius
export default function convertLatLngToSphere (lat, lng, baseRadius, z) {
// radians
const phi = radians(lat)
const theta = radians(lng - 180)
const radius = baseRadius + z
@miketahani
miketahani / tree.md
Created April 9, 2020 03:42 — forked from hrldcpr/tree.md
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

#!/bin/bash
#k8setup script v1.2019.4.11
#RHEL or CentOS 7.4+
#Direct any questions to [email protected]
#01101000 01110100 01110100 01110000 01110011 00111010 00101111 00101111 01101100 01100001 01101110 01100100 01101111 01101110 01101011 01100101 01111001 00101110 01100011 01101111 01101101 00101111
# Watch how it is used on youtube: https://youtu.be/KWehrWGjkm4
#
@johnmcfarlane
johnmcfarlane / begin(C++).md
Last active October 17, 2025 19:58
Resources for C++ beginners
@eltonvs
eltonvs / arch_installation.md
Last active January 12, 2025 11:21
Arch Linux step to step installation guide

Arch Linux Installation Guide

This guide will show step-by-step how to Install Arch Linux on UEFI mode.

Table of Contents

  • Bootable Flash Drive
  • BIOS
  • Pre installation
    • Set Keyboard Layout
    • Check boot mode
  • Update System Clock
@miketahani
miketahani / grabber.py
Created January 24, 2018 20:16
egghead.io series scraper
#!/usr/local/bin/python3
# one-off scraper for egghead.io videos in a series
# usage: chmod +x grabber.py && ./grabber.py <series stub>
# requires youtube-dl (`brew install youtube-dl`)
import os
import subprocess
import json
import argparse
from urllib.request import urlretrieve
@miketahani
miketahani / Blink.jsx
Created January 24, 2018 17:18
React <blink>
@shinaisan
shinaisan / App.js
Last active January 16, 2023 16:22
Redux Form - Material UI Example
import React from 'react';
import MaterialUiForm from './MaterialUiForm';
import { createStore } from 'redux';
import { Provider } from 'react-redux';
import reducer from './reducer';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
const store = createStore(reducer);
@subfuzion
subfuzion / README.md
Last active April 25, 2025 18:23
vim/neovim configuration

I recently switched over to neovim (see my screenshots at the bottom). Below is my updated config file.

It's currently synchronized with my .vimrc config except for a block of neovim-specific terminal key mappings.

This is still a work in progress (everyone's own config is always a labor of love), but I'm already extremely pleased with how well this is working for me with neovim. While terminal mode isn't enough to make me stop using tmux, it is quite good and I like having it since it simplifies my documentation workflow for yanking terminal output to paste in a markdown buffer.

These days I primarily develop in Go. I'm super thrilled and grateful for fatih/vim-go,