Skip to content

Instantly share code, notes, and snippets.

View ChronSyn's full-sized avatar

Scott Pritchard ChronSyn

View GitHub Profile
@satishbabariya
satishbabariya / main.go
Created December 7, 2021 11:44
supabase + gorush notification middleware service
package main
import (
"fmt"
"net/http"
"os"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
"github.com/sirupsen/logrus"
@lletfrix
lletfrix / ShadowView.js
Last active May 28, 2021 01:13
ShadowView.js
import React from 'react';
import { View, StyleSheet, Text, Dimensions, Platform } from 'react-native';
import Svg, { Circle, Rect, Defs, Use, Symbol, ForeignObject, LinearGradient, RadialGradient, Stop, G} from 'react-native-svg';
import { LinearGradient as LGradient } from 'expo-linear-gradient';
const Gauss = (x, sigma) => 1/(sigma * Math.sqrt(2*Math.PI)) * Math.exp( - (x**2) / (2*sigma**2 ))
const dot = (v1, v2) => v1.reduce( (acc, comp, idx) => (acc + comp*v2[idx]), 0)
const convolutions = (img, ker) => {
@jesster2k10
jesster2k10 / Fade.tsx
Created July 4, 2019 20:52
React Native iOS 11 Style Large Title with Support For Search Component & Menu Buttons
import React, { Component } from 'react'
import { Animated, StyleProp, ViewStyle } from 'react-native'
export type FadeDirection = 'up' | 'down'
interface FadeProps {
visible?: boolean
style?: StyleProp<ViewStyle>
children: React.ReactNode
direction?: FadeDirection
@tsapeta
tsapeta / withEventEmitter.js
Created December 31, 2018 11:52
Expo TaskManager example with EventEmitter
import React from 'react';
import { TaskManager } from 'expo';
import { EventEmitter } from 'fbemitter';
const taskName = 'task-name-of-your-choice';
const taskEventName = 'task-update';
const eventEmitter = new EventEmitter();
TaskManager.defineTask(taskName, ({ data, error }) => {
if (!error) {
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@4poc
4poc / LimitStream.js
Created December 10, 2011 03:41
Node.js: LimitStream (Bandwidth limited Readable+Writable Stream)
var fs = require('fs'),
util = require('util'),
Stream = require('stream').Stream;
/**
* Create a bandwidth limited stream
*
* This is a read+writeable stream that can limit how fast it
* is written onto by emitting pause and resume events to
* maintain a specified bandwidth limit, that limit can