Skip to content

Instantly share code, notes, and snippets.

View giddygitau's full-sized avatar

Gideon Gitau giddygitau

View GitHub Profile
@giddygitau
giddygitau / .pylintrc
Created January 28, 2017 06:29 — forked from gabrielhurley/.pylintrc
PyLint config file that works reasonably well for linting Django files. Should be placed in ~/.pylintrc.
[MASTER]
# Specify a configuration file.
#rcfile=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook=
# Profiled execution.
@giddygitau
giddygitau / multi-git.md
Created June 24, 2017 08:39 — forked from rosswd/multi-git-win.md
Setting up a Github and Bitbucket account on the same computer.

Setting up github and bitbucket on the same computer

Github will be the main account and bitbucket the secondary.

Create SSH Keys

ssh-keygen -t rsa -C "github email"

Enter passphrase when prompted. If you see an option to save the passphrase in your keychain, do it for an easier life.

@giddygitau
giddygitau / ManyToManyRelationships.md
Created July 8, 2017 18:13 — forked from elliette/ManyToManyRelationships.md
Describing `belongsToMany` and `hasMany` methods in Sequelize

Defining Many-to-Many Associations in Sequelize

Reference: Sequelize docs on association

Let’s say we have two models: Films and Festivals

We know that a film can be shown at many film festivals and that, conversely, a festival can show many films. This is what is known as a many-to-many relationship.

Knowing this, we can set up our associations:

@giddygitau
giddygitau / README-Template.md
Created September 27, 2017 11:21 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@giddygitau
giddygitau / App.js
Created November 30, 2017 06:11 — forked from fdidron/App.js
React Router v4 Auth
//Usage
import React from 'react';
import { BrowserRouter as Router } from 'react-router-dom';
import Route from './AuthRoute';
import Login from './Login';
import Private from './Private';
export default () =>
<Router>
@giddygitau
giddygitau / doom.txt
Created June 19, 2019 08:46 — forked from hjertnes/doom.txt
Doom Emacs Cheatsheet
SPC
SPC: find file
, switch buffer
. browse files
: MX
; EX
< switch buffer
` eval
u universal arg
x pop up scratch
@giddygitau
giddygitau / cursorPagination.ts
Created October 7, 2019 11:08 — forked from VojtaSim/cursorPagination.ts
TypeORM + TypeGraphQL cursor pagination
import { ObjectType, Field, ClassType, Int, ArgsType } from 'type-graphql';
import { SelectQueryBuilder } from 'typeorm';
import Cursor, { TCursor } from 'scalar/cursor';
@ArgsType()
export class CursorPaginationArgs {
@Field({ nullable: true })
after?: TCursor;