Skip to content

Instantly share code, notes, and snippets.

View grant-park's full-sized avatar
⌨️
keyboarding

Grant Park grant-park

⌨️
keyboarding
View GitHub Profile

Keybase proof

I hereby claim:

  • I am grant-park on github.
  • I am grantxs (https://keybase.io/grantxs) on keybase.
  • I have a public key ASAa2dR1G-N6ziAkEiTz0GKhf7cpBve7WzswF6DQvjcdLwo

To claim this, I am signing this object:

@grant-park
grant-park / keymap_snapshot
Created September 25, 2018 00:59
current keymp for micro_32 prototype
#include QMK_KEYBOARD_H
extern keymap_config_t keymap_config;
#define _______ KC_TRNS
#define USEDKEY KC_TRNS
#define GUI(X) MT(MOD_LGUI, X)
#define ALT(X) MT(MOD_LALT, X)
#define SFT(X) MT(MOD_LSFT, X)
#define CTL(X) MT(MOD_LCTL, X)
@grant-park
grant-park / keymap.c
Created April 24, 2017 06:36
serial keymap for lets split
#include "lets_split.h"
#include "action_layer.h"
#include "eeconfig.h"
extern keymap_config_t keymap_config;
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
from __future__ import division
import math
def is_square(apositiveint):
x = apositiveint // 2
seen = set([x])
while x * x != apositiveint:
x = (x + (apositiveint // x)) // 2
if x in seen: return False
seen.add(x)
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
self.imageCache.removeAllObjects()
}
func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
//In storyboard, my collection view cell has the identifier "PostCell"
extension MapViewController: MKMapViewDelegate {
func mapView(mapView: MKMapView!, viewForAnnotation annotation: MKAnnotation!) -> MKAnnotationView! {
if let annotation = annotation as? Food {
if annotation == mapView.userLocation {
return nil
}
let identifier = "pin"
var view: CustomPin
@grant-park
grant-park / SudokuSolver.py
Created March 21, 2015 20:40
It solves sudoku puzzles using backtracking.
def readGrid(filename):
f = open(filename)
i = 0
grid = []
while i <= 8:
rowText = f.readline()
rowList = rowText.split()
rowList = [int(i) for i in rowList]
grid.append(rowList)
i += 1