Skip to content

Instantly share code, notes, and snippets.

View saniul's full-sized avatar

saniul saniul

View GitHub Profile
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active July 6, 2024 09:32
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@andymatuschak
andymatuschak / MultiDirectionAdjudicatingScrollView.swift
Created January 26, 2015 19:31
Source for the Khan Academy app's unusual scrolling interactions
//
// MultiDirectionAdjudicatingScrollView.swift
// Khan Academy
//
// Created by Andy Matuschak on 12/16/14.
// Copyright (c) 2014 Khan Academy. All rights reserved.
//
import UIKit
import UIKit.UIGestureRecognizerSubclass
@zats
zats / README.md
Last active July 2, 2019 10:45
UIPreviewActionItem for SFSafariViewController through delegation not subclassing

Adding UIPreviewActionItem to SFSafariViewController might be a tedious task. This extansion should help.

let vc = SFSafariViewController(initialURL: url, entersReaderIfAvailable: true)
vc.previewActionItemsDelegate = self

When presenting SFSafariViewController use convenience initializer that will store original URL for later, it'll make custom action requiring original URL easier. But it's not mandatory.

Here is the delegate implementation, this is where we might want to use initialURL

func safariViewControllerPreviewActionItems(controller: SFSafariViewController) -> [UIPreviewActionItem] {
@jamiew
jamiew / brew-sync.sh
Created January 8, 2016 17:14 — forked from witt3rd/brew-sync.sh
Sync Homebrew installations between Macs via Dropbox (including casks)
#!/bin/bash
# Sync Homebrew installations between Macs via Dropbox
#
BREW="/usr/local/bin/brew"
# first get local settings
echo "Reading local settings ..."
rm -f /tmp/brew-sync.*
Links:
A Visual Introduction to Machine Learning
http://www.r2d3.us/visual-intro-to-machine-learning-part-1/
UC Berkeley CS188 Intro to AI -- Course Materials
http://ai.berkeley.edu/home.html
Eyeo 2016 – Gene Kogan
https://vimeo.com/180044029
@learner-long-life
learner-long-life / EthereumDev.md
Created July 31, 2017 02:18
How to Set up an Ethereum Dev Environment

How to Set up an Ethereum Dev Environment

So you want to be an Ethereum developer! Congrats, much treasure awaits you. Developing Ethereum dapps benefits from having a well-crafted development environment. This can often be daunting to beginners, so I'm giving you my favorite dev environment to help get you started.

Once your code fortress is constructed, you'll be able to

  • Compile smart contracts written in Solidity
@learner-long-life
learner-long-life / EthereumNodeGCP.md
Last active October 4, 2022 11:54
How to Run an Ethereum (Geth Light) Node on GCP

How to Run an Ethereum Node in GCP

NOTE: This doc was created in 2018 and is no longer being kept up-to-date. There are some useful updates and Q&A in the comments, and Google has since disallowed cryptocurrency nodes explicitly in their Terms of Service. While I work on an updated how-to-run-a-node tutorial, you are welcome to join our ETH developer chat and share what you'd like to work on.

https://matrix.to/#/#invisible-college/cryptocoin:matrix.org?via=matrix.org&via=t2bot.io

Core Priorities

Briefly state your (2-5) core priorities that represent your primary areas of focus and the targeted business impact. Also include your critical indicators of success for each

  1. Lower the barrier of entry to adopting and understanding TypeScript. Will validate by re-requesting feedback from the community a second time like issues #31983 and hopefully it should be a new set of problems.

  2. Provide resources for people wanting to improve the TypeScript community. Validated by seeing more meetups, conferences rely on infra we provide.

  3. Make it easier to people wanting to build tooling around TypeScript. Some of this can be think this can be validated by making a community survey and comparing to internal feedback. I have some personal docs, and ideas in the website overview but would be good to get overall ideas.

@kconner
kconner / macOS Internals.md
Last active June 27, 2024 18:48
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options: