Skip to content

Instantly share code, notes, and snippets.

View 1hbb's full-sized avatar
🚀

1hbb

🚀
  • World
View GitHub Profile
@AlexandreCools
AlexandreCools / ViewController.swift
Last active February 25, 2021 13:13
[MEDIUM] Strava API - Access & Refresh token - iOS 13, Swift 5 - Step 2
import UIKit
import AuthenticationServices
class ViewController: UIViewController {
private var authSession: ASWebAuthenticationSession?
private let clientId: String = "11111"
private let urlScheme: String = "youUrlScheme"
private let fallbackUrl: String = "yourFallbackUrl.com"
@bradtraversy
bradtraversy / mongodb_cheat_sheet.md
Last active November 24, 2025 05:49
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@lattner
lattner / TaskConcurrencyManifesto.md
Last active December 6, 2025 10:37
Swift Concurrency Manifesto
@mttcrsp
mttcrsp / UITableView+beginRefreshing.swift
Last active February 21, 2025 11:04
Extension that allows programmatic pull to refresh
import UIKit
public extension UITableView {
public func beginRefreshing() {
// Make sure that a refresh control to be shown was actually set on the view
// controller and the it is not already animating. Otherwise there's nothing
// to refresh.
guard let refreshControl = refreshControl, !refreshControl.isRefreshing else {
return
@tomysmile
tomysmile / mac-setup-redis.md
Last active July 10, 2025 21:05
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
@sindbach
sindbach / mongodb_lookup.go
Created April 15, 2016 00:40
A simple example of how to use $lookup in Golang using mgo.
package main
import (
"fmt"
"gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
)
func main() {
session, err := mgo.Dial("localhost")
if err != nil {
@wosephjeber
wosephjeber / ngrok-installation.md
Last active November 25, 2025 11:24
Installing ngrok on Mac

Installing ngrok on OSX

For Homebrew v2.6.x and below:

brew cask install ngrok

For Homebrew v2.7.x and above:

@PurpleBooth
PurpleBooth / README-Template.md
Last active December 8, 2025 22:56
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