Skip to content

Instantly share code, notes, and snippets.

View jukbot's full-sized avatar
🏠
Working from home

Juk - a search builder jukbot

🏠
Working from home
  • CalCal
  • Bangkok, Thailand
  • X @jukbot
View GitHub Profile
@akexorcist
akexorcist / MaterialButtonGroup.kt
Last active October 26, 2021 18:05
Material Button Group for Material Button in Android
package com.akexorcist.materialdesign
import android.content.Context
import androidx.core.view.MarginLayoutParamsCompat
import androidx.core.view.ViewCompat
import android.util.AttributeSet
import android.util.Log
import android.view.View
import android.widget.LinearLayout
import com.google.android.material.shape.AbsoluteCornerSize
@rayriffy
rayriffy / popcat.js
Last active August 15, 2021 15:39
popcat.click clicker
// popcat auto-clicker
// by rayriffy
// drop this into DevTools console
// to run:
// let agent = clicker()
//
// to stop:
// agent.stop()
@roqbez
roqbez / import_excel.js
Created April 30, 2021 00:00
Node.js + Nest.js code to import Excel file to a database
import { HttpService, Injectable, Logger } from '@nestjs/common';
import { InjectModel } from '@nestjs/sequelize';
import { ReadStream } from 'fs';
import { Sequelize } from 'sequelize-typescript';
import * as xlsx from 'xlsx';
import { WorkBook, WorkSheet } from 'xlsx';
import { ArquivoImportacao } from './dto/arquivo-importacao.dto';
@Injectable()
export class ImportacaoProcessosService {
@prologic
prologic / LearnGoIn5mins.md
Last active April 22, 2024 13:28
Learn Go in ~5mins
@kcak11
kcak11 / App.md
Last active November 30, 2023 18:24
Country Codes

Country Codes

List of all Country Codes (ISO & Dialing) sorted in alphabetical order.

@leanazulyoro
leanazulyoro / server.js
Last active February 16, 2024 20:49
Next.js SSR Cache using LRU Cache
const express = require('express')
const next = require('next')
const Cache = require('lru-cache');
const compression = require('compression')
const port = parseInt(process.env.PORT, 10) || 3000
const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev })
@acoshift
acoshift / main.go
Last active March 3, 2020 06:20
http1 vs h2c
package main
import (
"context"
"crypto/tls"
"fmt"
"io"
"io/ioutil"
"net"
"net/http"
@puranjayjain
puranjayjain / DeleteFirestoreIndexes
Created February 10, 2020 09:23
Delete all firestore composite indexes
# Delete all firestore composite indexes
gcloud firestore indexes composite list --uri | xargs -I{} gcloud firestore indexes composite delete {} --quiet
import { ApolloClient, QueryOptions, MutationOptions } from 'apollo-client';
import { DocumentNode } from 'graphql';
import { getSdk, Requester } from '.generated/schema-typedefs';
import { ApolloRequestError } from './ApolloRequestError';
export type ApolloRequesterOptions<V, R> =
| Omit<QueryOptions<V>, 'variables' | 'query'>
| Omit<MutationOptions<R, V>, 'variables' | 'mutation'>;
@benznest
benznest / main.dart
Created September 17, 2019 09:02
AnimatedListexample fade transition items.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Animation Practice',
theme: ThemeData(