Skip to content

Instantly share code, notes, and snippets.

View redbar0n's full-sized avatar

redbar0n

View GitHub Profile
@iankronquist
iankronquist / 0_typing.md
Last active February 26, 2022 17:45
An Introduction to Python

Typing

When programmers talk about typing, most of the time they aren't talking about the odious task of pressing keys on a keyboard (watch any programmer and look to see how much of their time they spend actually typing out code. What you'll see instead is a lot of frowning and staring at the screen with an expression of great consternation as you can see them think "why the hell didn't my code do what I thought?"). Instead they're talking about the types of variables. Now you're probably familiar with the idea that there are numbers and strings and

@ugiacoman
ugiacoman / Client-Loading-Example.md
Last active June 24, 2022 20:50
SSR + CSR using next.js

Whether your component relies on client-side features or you are using 3rd party components that are not designed for server-side rendering, sometimes you'll want to defer rendering until on the client. For our example, we'll be using react-chart-2 to load a Doughnut chart.

Doughnut

You'll need a next project and to install chart.js + react-chartjs-2.

$ npm install --save chart.js react-chartjs-2  
@0xjac
0xjac / private_fork.md
Last active May 24, 2026 23:02
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@ericelliott
ericelliott / rxjs-patching.js
Created December 10, 2016 00:35
Reduce bundle size with RxJS patching
import { Observable } from 'rxjs/Observable';
// then patch import only needed operators:
import 'rxjs/add/operator/map';
import 'rxjs/add/observable/from';
const foo = Observable.from([1, 2, 3]);
foo.map(x => x * 2).subscribe(n => console.log(n));
@delbetu
delbetu / 01paradigms.rb
Last active October 11, 2022 08:02
Notes from - Gary Bernhardt boundaries talk.
# Procedural (Mutation and data separated from code)
# OO (Mutation and data combined with code)
# Functional Version (Imutability and data separated from code)
# FauxO Version (Immutability and data combined with code)
#Procedural-we have knowledge of the internals
def feeding_time
walruses.each do |walrus|
walrus.stomach << Cheese.new
end
@simoami
simoami / social-activitiy-graph-gist-template.adoc
Last active May 29, 2023 15:10 — forked from jexp/graph_gist_template.adoc
SOCIAL ACTIVITY STREAM GRAPH

SOCIAL ACTIVITY STREAM GRAPH

Introduction

@nicnic-cc
nicnic-cc / CountOpenSafariTabs.scpt
Last active February 8, 2021 13:45 — forked from edenwaith/CountOpenSafariTabs.scpt
AppleScript: Count the number of open tabs in Safari and show a notification
-- CountOpenSafariTabs.scpt
-- Author: Chad Armstrong
-- Date: 13 May 2016
-- Description: Count the number of open tabs in Safari
-- To run from CLI: osascript CountOpenSafariTabs.scpt
--
-- Modified by V on 4 February 2017 to show a system notification with the number
tell application "Safari"
@reborg
reborg / rich-already-answered-that.md
Last active May 8, 2026 14:31
A curated collection of answers that Rich gave throughout the history of Clojure

Rich Already Answered That!

A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.

How to use:

  • The link in the table of content jumps at the copy of the answer on this page.
  • The link on the answer itself points back at the original post.

Table of Content

@iankronquist
iankronquist / 0-Programming-Paradigms.md
Last active January 29, 2026 09:14
The Fundamentals of Programming

Programming Paradigms

In programming, a paradigm is an abstract way to understand and solve a problem. A paradigm is like a perspective, a high point from which you can survey the terrain and try to decide the path your journey will take.

Toay, there are three major programming paradigms:

  1. Imperative Programming.
  2. Object Oriented Programming (OOP).
  3. Functional Programming (FP).

In principle any language can be used to program in any paradigm, but in practice certain languages tend to favor certain paradigms.

@blackgate
blackgate / mbp2011-disable-amd-gpu.md
Last active June 11, 2025 10:32
Macbook Pro 2011 - Disable AMD GPU