Skip to content

Instantly share code, notes, and snippets.

View rawnly's full-sized avatar
🧨
fixing my printer

Federico rawnly

🧨
fixing my printer
View GitHub Profile
import { useEffect, useRef } from 'react'
import * as Three from 'three'
// https://raw.githubusercontent.com/josephg/noisejs/master/perlin.js
const { noise } = require('../perlin')
const Page = () => {
const divRef = useRef<HTMLDivElement>()
package main
import (
"fmt"
"strconv"
"strings"
)
func main() {
str := "845674"
import ms from 'ms'
import { DMChannel, Message, NewsChannel, TextChannel } from 'discord.js'
import { REACTIONS } from './reactions';
type Channel = TextChannel | DMChannel | NewsChannel
type QuestionType = 'confirm' | 'text';
export type Question = {
name: string;
message: String;
@rawnly
rawnly / commit.sh
Last active January 14, 2021 14:18
# Usage: commit <message> [-a|--add] [-p|--push]
# Example: commit "my first commit" -a -p
# GIT Equivalent:
# - git add -A .
# - git commit -a -m "NEXT-<*>: my first commit"
# - git push
function commit {
if [ -z $1 ]; then
echo "No commit message";
const generateRandomString = (length: number): string =>
`1${"0".repeat(length)}`.replace(/[01]/g, () => (0 | (Math.random() * 16)).toString(16))
package com.federicovitale.bookmytrack.util;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Optional;
import java.util.function.Function;
public class Grouper<Z, T> {
[
"src/components/layoutComponents/errorStyle.scss",
"public/stylesheets/main/modules/registration.scss",
"src/pages/MovieTheaters/style.scss",
"src/pages/Pairing/style.scss",
"src/components/recovery/recovery.scss",
"src/components/ui/page/style.scss",
"src/components/MovieTheaters/AllTheatersHead/style.scss",
"src/components/MovieTheaters/AllTheaterList/style.scss",
"src/components/ui/ThreeAreaPanel/style.scss",
package main
import "github.com/sirupsen/logrus"
func main() {
Init()
ProcessNodes()
DFS(nodes[0])
}
from statistics import median
d={}
flag=True
def load_from_file(filename):
try:
# Load data from file
f=open(filename, "r")
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/services.dart';
import 'package:google_sign_in/google_sign_in.dart';
class SignInUtility {
static final FirebaseAuth _auth = FirebaseAuth.instance;
static final GoogleSignIn googleSignIn = GoogleSignIn();
static Future<FirebaseUser> signInWithGoogle() async {
final GoogleSignInAccount googleSignInAccount = await googleSignIn.signIn();