Skip to content

Instantly share code, notes, and snippets.

View catalinmiron's full-sized avatar
🎥
https://www.youtube.com/c/catalinmirondev

Catalin Miron catalinmiron

🎥
https://www.youtube.com/c/catalinmirondev
View GitHub Profile
@catalinmiron
catalinmiron / spotify-waveform.js
Created April 21, 2022 20:02 — forked from leemartin/spotify-waveform.js
Spotify Waveform Data Generation from Audio Analysis API
const fs = require('fs')
const data = require('./track.json')
let duration = data.track.duration
let segments = data.segments.map(segment => {
return {
start: segment.start / duration,
duration: segment.duration / duration,
loudness: 1 - (Math.min(Math.max(segment.loudness_max, -35), 0) / -35)
@catalinmiron
catalinmiron / sponsors.ts
Created April 12, 2022 12:52 — forked from steveruizok/sponsors.ts
A Next.js API route that will generate an image of your most recent 100 Github sponsors.
// pages/api/sponsors.ts
import { NextApiRequest, NextApiResponse } from 'next'
const AV_SIZE = 32
const PADDING = 4
const COLS = 16
type SponsorResult = { avatarUrl: string; login: string }
@catalinmiron
catalinmiron / [...nextauth].ts
Created April 12, 2022 12:50 — forked from steveruizok/[...nextauth].ts
Helpers for Github Sponsorware
// pages/api/auth/[...nextauth.ts]
// Follow docs in nextauth
import { isSignedInUserSponsoringMe } from 'utils/github'
import type { NextApiHandler, NextApiRequest, NextApiResponse } from 'next'
import NextAuth from 'next-auth'
import GithubProvider from 'next-auth/providers/github'
export default function Auth(
@catalinmiron
catalinmiron / App.tsx
Created June 4, 2021 21:08 — forked from JonnyBurger/App.tsx
Slow Camera
export const App => <DepthCameraComp />
@catalinmiron
catalinmiron / Fastfile.rb
Created June 4, 2021 21:05 — forked from JonnyBurger/Fastfile.rb
My CircleCI setup for React Native apps
fastlane_version '2.105.2'
before_all do
ensure_git_branch
git_pull
end
platform :ios do
desc 'Fetch certificates and provisioning profiles'
lane :certificates do
// Shader created with Shader Forge v1.38
// Shader Forge (c) Neat Corporation / Joachim Holmer - http://www.acegikmo.com/shaderforge/
// Note: Manually altering this data may prevent you from opening it in Shader Forge
/*SF_DATA;ver:1.38;sub:START;pass:START;ps:flbk:,iptp:0,cusa:False,bamd:0,cgin:,lico:1,lgpr:1,limd:1,spmd:1,trmd:0,grmd:0,uamb:True,mssp:True,bkdf:False,hqlp:False,rprd:False,enco:False,rmgx:True,imps:True,rpth:0,vtps:0,hqsc:True,nrmq:1,nrsp:0,vomd:0,spxs:False,tesm:0,olmd:1,culm:0,bsrc:0,bdst:1,dpts:2,wrdp:True,dith:0,atcv:False,rfrpo:True,rfrpn:Refraction,coma:15,ufog:True,aust:True,igpj:False,qofs:0,qpre:2,rntp:3,fgom:False,fgoc:False,fgod:False,fgor:False,fgmd:0,fgcr:1,fgcg:1,fgcb:1,fgca:1,fgde:0.01,fgrn:5,fgrf:15,stcl:False,atwp:False,stva:128,stmr:255,stmw:255,stcp:6,stps:0,stfa:0,stfz:0,ofsf:0,ofsu:0,f2p0:False,fnsp:False,fnfb:False,fsmp:False;n:type:ShaderForge.SFN_Final,id:4904,x:33076,y:32617,varname:node_4904,prsc:2|diff-5996-OUT,clip-8651-A;n:type:ShaderForge.SFN_Color,id:848,x:32
@catalinmiron
catalinmiron / submit.md
Created October 26, 2019 06:11 — forked from tanaikech/submit.md
Retrieving Access Token From OneDrive using Google Apps Script

Retrieving Access Token From OneDrive using Google Apps Script

Overview

This GAS sample is for retrieving access token to use OneDrive APIs using Google Apps Script.

In this script, the authorization code is automatically retrieved.

Demo

@catalinmiron
catalinmiron / submit.md
Created October 26, 2019 06:10 — forked from tanaikech/submit.md
Uploading Files to OneDrive Using Node.js

In order to use this script, please retrieve client id, client secret and refresh token before. About this, you can see the detail information at https://gist.github.com/tanaikech/d9674f0ead7e3320c5e3184f5d1b05cc.

1. Simple item upload

This is for the simple item upload is available for items with less than 4 MB of content. The detail information is https://dev.onedrive.com/items/upload_put.htm.

var fs = require('fs');
var mime = require('mime');
var request = require('request');
@catalinmiron
catalinmiron / DrawerControl.tsx
Created November 28, 2018 15:02 — forked from erictraut/DrawerControl.tsx
ReactXPDrawerWithConstantWidth
/*
* This file implements a basic drawer control.
*/
import RX = require('reactxp');
interface MainPanelProps extends RX.CommonStyledProps<RX.Types.ViewStyleRuleSet> {
renderDrawer: () => JSX.Element;
renderContent: () => JSX.Element;
}
@catalinmiron
catalinmiron / mailMananger.js
Created July 19, 2017 16:48 — forked from eibrahim/mailMananger.js
A node worker for firebase to send emails using mandrill
var mandrill = require('mandrill-api/mandrill');
var mandrill_client = new mandrill.Mandrill('YOUR MANDARILL KEY');
var FROM_EMAIL = 'info@ourstandup.com';
var FROM_NAME = 'Our Standup';
var db = require('./database');
var invitationsRef = db.ref("invitations");
var teamsRef = db.ref("teams");
var usersRef = db.ref("users");