Skip to content

Instantly share code, notes, and snippets.

View goddamnyouryan's full-sized avatar

Ryan MacInnes goddamnyouryan

View GitHub Profile
@hfossli
hfossli / SimpleTabView.swift
Last active February 10, 2021 15:32
SimpleTabView
import Foundation
import SwiftUI
struct SimpleTab<SelectionValue: Equatable & Hashable>: View, Identifiable {
var id: SelectionValue
var image: Image
var label: Text
var content: AnyView
@arashkashi
arashkashi / ShareViewcontroller.swift
Created August 20, 2019 07:34
Add share controller
//
// TestViewController.swift
// Balance
//
// Created by ArashK on 2019-08-01.
// Copyright © 2019 Congruent Tech. UG. All rights reserved.
//
import UIKit
import CloudKit
@nabilfreeman
nabilfreeman / lambda-redirect-to-trailing-slash.js
Last active March 7, 2023 20:31
Redirect to trailing slashes on CloudFront with AWS Lambda. (all this because S3 uses 302 redirects instead of 301)
'use strict';
const path = require('path')
const redirect = new_url => {
return {
status: '301',
statusDescription: 'Moved Permanently',
headers: {
location: [{
@ngsmrk
ngsmrk / sidekiq_monitoring
Created August 11, 2014 11:51
Sidekiq queue checking via rails console
stats = Sidekiq::Stats.new
stats.queues
stats.enqueued
stats.processed
stats.failed
@staltz
staltz / introrx.md
Last active April 29, 2024 09:25
The introduction to Reactive Programming you've been missing
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 20, 2024 16:52
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@cobusc
cobusc / postgresql_date_function_index_howto.md
Last active March 12, 2024 12:10
Short explanation of the issues faced when trying to create a PostgreSQL index using the date() function and how to resolve it.
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active April 30, 2024 04:42
A badass list of frontend development resources I collected over time.
@njvitto
njvitto / deploy.rake
Created April 11, 2010 16:56 — forked from RSpace/deploy.rake
Rakefile to deploy and rollback to Heroku in two different environments (staging and production) for the same app
#Deploy and rollback on Heroku in staging and production
task :deploy_staging => ['deploy:set_staging_app', 'deploy:push', 'deploy:restart', 'deploy:tag']
task :deploy_production => ['deploy:set_production_app', 'deploy:push', 'deploy:restart', 'deploy:tag']
namespace :deploy do
PRODUCTION_APP = 'YOUR_PRODUCTION_APP_NAME_ON_HEROKU'
STAGING_APP = 'YOUR_STAGING_APP_NAME_ON_HEROKU'
task :staging_migrations => [:set_staging_app, :push, :off, :migrate, :restart, :on, :tag]
task :staging_rollback => [:set_staging_app, :off, :push_previous, :restart, :on]