Skip to content

Instantly share code, notes, and snippets.

View ItsWendell's full-sized avatar

Wendell Misiedjan ItsWendell

View GitHub Profile
https://github.com/thibauts/node-castv2 <- cast v2 implementation in nodejs. Client OK, server fails on authentication
https://github.com/thibauts/node-castv2/issues/2 <- problem description of receiver authentication
https://chromium.googlesource.com/chromium/chromium/+/8a6c33a47fa2986cfce9895829246f366804883e/chrome/browser/extensions/api/cast_channel/cast_auth_util.h
<- Google cast plugin to chromium, probably part of what we're supposed to get from google
https://chromium.googlesource.com/chromium/chromium/+/8a6c33a47fa2986cfce9895829246f366804883e/chrome/browser/extensions/api/cast_channel/cast_auth_util_nss.cc
<- authentication of receivers in cast plugin to chromium. Reason why we need google blessing to have any form of receiver
https://github.com/dz0ny/leapcast
https://github.com/EiNSTeiN-/chromecast-widevine-tools - CA API
@gregblass
gregblass / App.js
Last active September 21, 2019 17:30
Expo/React Navigation - Google Analytics Integration
import React, { Component } from 'react'
import { RootNavigator } from './navigators'
import { GoogleAnalyticsTracker } from './utils/analytics'
import { GA_TRACKING_ID } from './constants'
class App extends Component {
// gets the current screen from navigation state
getCurrentRouteName = (navigationState) => {
if (!navigationState) {
return null
@saqueib
saqueib / 0_uploader.blade.php
Last active June 9, 2021 15:57
Reusable upload component in Laravel with Dropzone.js - visit http://wp.me/p8cmxL-9Q for tutorial
@php $dropzoneId = isset($dz_id) ? $dz_id : str_random(8); @endphp
<div id="{{$dropzoneId}}" class="dropzone">
<div class="dz-default dz-message">
<h3>{{ $title or 'Drop files here or click to upload.'}}</h3>
<p class="text-muted">{{ $desc or 'Any related files you can upload' }} <br>
<small>One file can be max {{ config('attachment.max_size', 0) / 1000 }} MB</small></p>
</div>
</div>
<!-- Dropzone {{ $dropzoneId }} -->
@SuperSpyTX
SuperSpyTX / README.md
Last active February 20, 2022 12:10
42 Norminette linter for ALE.

Norminette Linter for ALE (Asynchronous Linting Engine)

https://github.com/w0rp/ale

Installation

Install this in your ale plugin directory (For Vundle + NeoVim that may be ~/.config/nvim/bundle/ale/ale_linters/c/norminette.vim)

You will of course, need the norminette ruby gem in your PATH. gem install --user --pre norminette

@codefrau
codefrau / cloudflare-timeout.mjs
Last active September 6, 2021 21:06
Workaround for "Cannot clear a timeout created in a different request context" error in Cloudflare Workers
// Replacement for setTimeout/clearTimeout in Cloudflare Workers
// Avoids "Cannot clear a timeout created in a different request context" error
//
// Usage:
// import { setTimeout, clearTimeout } from "./cloudflare-timeout.mjs"
//
// Author: Vanessa "Codefrau" Freudenberg <[email protected]>
export function setTimeout(func, ...opts) {
const timeout = { cancelled: false };
@kjmph
kjmph / A_UUID_v7_for_Postgres.sql
Last active November 6, 2024 19:57
Postgres PL/pgSQL function for UUID v7 and a bonus custom UUID v8 to support microsecond precision as well. Read more here: https://datatracker.ietf.org/doc/draft-peabody-dispatch-new-uuid-format/
-- Based off IETF draft, https://datatracker.ietf.org/doc/draft-peabody-dispatch-new-uuid-format/
create or replace function uuid_generate_v7()
returns uuid
as $$
begin
-- use random v4 uuid as starting point (which has the same variant we need)
-- then overlay timestamp
-- then set version 7 by flipping the 2 and 1 bit in the version 4 string
return encode(
@joelonsql
joelonsql / PostgreSQL-EXTENSIONs.md
Last active November 13, 2024 09:01
1000+ PostgreSQL EXTENSIONs

🗺🐘 1000+ PostgreSQL EXTENSIONs

This is a list of URLs to PostgreSQL EXTENSION repos, listed in alphabetical order of parent repo, with active forks listed under each parent.

⭐️ >= 10 stars
⭐️⭐️ >= 100 stars
⭐️⭐️⭐️ >= 1000 stars
Numbers of stars might not be up-to-date.

@maaft
maaft / mutate-schema.py
Created June 2, 2022 16:43
This will mutate an extracted GraphQL Schema from Hasura to add client-side custom type support for JSONB columns
from pathlib import Path
from typing import Optional, Set
from gql import gql
from graphql import GraphQLEnumType, GraphQLFieldMap, GraphQLInputObjectType, GraphQLList, GraphQLNonNull, GraphQLObjectType, GraphQLScalarType, extend_schema, build_ast_schema
from graphql.utilities import print_schema
#############
# HOWTO
@colelawrence
colelawrence / createTrpcDurableObject.ts
Last active March 27, 2024 22:10
Create strongly typed Durable Objects with TRPC wrappers (requires trpc@10)
import { createTRPCProxyClient, httpLink } from "@trpc/client";
import { AnyRouter, initTRPC, MaybePromise, Router } from "@trpc/server";
import { fetchRequestHandler } from "@trpc/server/adapters/fetch";
import type { ParserWithInputOutput, ParserWithoutInput } from "@trpc/server/dist/core/parser";
import type { AnyRouterDef } from "@trpc/server/dist/core/router";
import type { ResponseMetaFn } from "@trpc/server/dist/http/internals/types";
import { getParseFn } from "./getParseFn";
export type TrpcDurableObjectRouter<Router extends AnyRouter> = {
router: Router,