Skip to content

Instantly share code, notes, and snippets.

View kevgathuku's full-sized avatar

Kevin Gathuku kevgathuku

View GitHub Profile
@matthewjberger
matthewjberger / instructions.md
Last active July 5, 2026 10:19
Install a nerd font on ubuntu

1.) Download a Nerd Font

2.) Unzip and copy to ~/.fonts

3.) Run the command fc-cache -fv to manually rebuild the font cache

port module Spelling exposing (..)
import Html exposing (..)
import Html.App as App
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import String
main =
@ccnokes
ccnokes / store.js
Created September 17, 2016 21:49
Example "store" for user data in an Electron app
const electron = require('electron');
const path = require('path');
const fs = require('fs');
class Store {
constructor(opts) {
// Renderer process has to get `app` module via `remote`, whereas the main process can get it directly
// app.getPath('userData') will return a string of the user's app data directory path.
const userDataPath = (electron.app || electron.remote.app).getPath('userData');
// We'll use the `configName` property to set the file name and path.join to bring it all together as a string
@goizueta
goizueta / getPastPrsForUser.js
Last active June 13, 2016 16:22
Get past PRs. Github API only goes back 300 events (comments, commits, pushes, pulls, etc...)
var GitHubApi = require("github");
var user = "kn9ts";
var pullRequests = [];
var github = new GitHubApi({
// optional
debug: false,
protocol: "https",
host: "api.github.com", // should be api.github.com for GitHub
pathPrefix: "", // for some GHEs; none for GitHub
timeout: 5000,
@thegitfather
thegitfather / vanilla-js-cheatsheet.md
Last active May 4, 2026 23:41
Vanilla JavaScript Quick Reference / Cheatsheet
@jasongilman
jasongilman / atom_clojure_setup.md
Last active October 28, 2025 22:34
This describes how I setup Atom for Clojure Development.

Atom Clojure Setup

This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in init.coffee and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.

Install Atom

Download Atom

The Atom documentation is excellent. It's highly worth reading the flight manual.

@yang-wei
yang-wei / destructuring.md
Last active February 15, 2026 13:03
Elm Destructuring (or Pattern Matching) cheatsheet

Should be work with 0.18

Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirros the construction. Compare to other languages, Elm support much less destructuring but let's see what it got !

Tuple

myTuple = ("A", "B", "C")
myNestedTuple = ("A", "B", "C", ("X", "Y", "Z"))
@janoliver
janoliver / tutorial.md
Last active June 16, 2026 17:22
Arch Linux as a Web Server

In this tutorial, I briefly explain how to set up a webserver using nginx, openssl and uwsgi on Arch Linux. The tutorial is applicable to other Linux distributions and goes through the required configuration step by step. It is, I believe, beginner friendly.

0. Version

I updated, changed and tested the tutorial on Dec. 8th, 2013. All commands and configuration files relate to the software versions that are currently available in the Arch package repositories. Especially nginx and uwsgi change often and

@mikermcneil
mikermcneil / sails.sockets.broadcast() examples.md
Last active October 5, 2019 05:23
Examples of broadcasting to a room or emitting to a single socket in your Sails app using sails.sockets.broadcast().
@manuelbieh
manuelbieh / sequelize-schema-file-generator.js
Last active April 5, 2025 20:02
Automatically generates migration files from your sequelize models
import * as models from "models";
import Sequelize from "sequelize";
import fs from "fs";
delete models.default;
const sequelize = new Sequelize(
'',
'',
'', {