Skip to content

Instantly share code, notes, and snippets.

View zaydek's full-sized avatar
🤠
Howdy!

Zaydek MG zaydek

🤠
Howdy!
View GitHub Profile
@zaydek
zaydek / tailwind.config.js
Last active February 17, 2020 04:36
npx tailwindcss init --full
module.exports = {
prefix: '',
important: false,
separator: ':',
theme: {
screens: {
sm: '640px',
md: '768px',
lg: '1024px',
xl: '1280px',
const Button = ({ svg: SVG, ...props }) => (
<WithTooltip dir="t" tooltip={props.tooltip}>
{!props.on ? (
// Off:
<div className="p-2 text-gray-800 hover:bg-md-gray-100 active:bg-md-gray-200 rounded-lg cursor-pointer" onClick={props.onClick}>
<SVG className="p-px w-5 h-5 stroke-500" />
</div>
) : (
// On:
<div className="p-2 text-blue hover:bg-blue-100 rounded-lg cursor-pointer" onClick={props.onClick}>
.drop-down-enter {
opacity: 0;
transform: translateY(-2rem);
transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}
.drop-down-active {
opacity: 1;
transform: translateY(0rem);
transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
module.exports = {
// ...
// https://tailwindcss.com/docs/configuring-variants/#default-variants-reference
variants: {
textColor: [
"responsive",
"hover",
"focus",
"active", // Added
import React, { Component } from "react";
import { CatServiceClient } from "../../proto/api/v1/ApiServiceClientPb";
import {
GetFeaturedCatsRequest,
Cat,
GetFeaturedCatsResponse
} from "../../proto/api/v1/api_pb";
import {
@zaydek
zaydek / connection.go
Created March 13, 2020 19:48
Relay-like connections implementation for graph-gophers/graphql-go
package main
import (
"context"
"database/sql"
"encoding/base64"
"encoding/json"
"fmt"
"time"
# https://cloud.google.com/run/docs/quickstarts/build-and-deploy#containerizing
# Use the official Golang image to create a build artifact.
# This is based on Debian and sets the GOPATH to /go.
# https://hub.docker.com/_/golang
FROM golang:1.13 as builder
# Create and change to the app directory.
WORKDIR /app
@zaydek
zaydek / README.md
Last active March 19, 2020 23:21
Automate sending personalized emails (from Gmail) using Go
  1. Go to https://myaccount.google.com/lesssecureapps and temporarily enable ‘Less secure app access’. You can enable it immediately after.
  2. Invoke from the command-like:
$ DISPLAY_NAME="Full name" USERNAME="username@gmail.com" PASSWORD="password" go run gmail.go
This file has been truncated, but you can view the full file.
[
{
"group": "Smileys & Emotion",
"subgroup": "face-smiling",
"codePoints": [
128512
],
"status": "fully-qualified",
"emoji": "😀",
"tag": "E1.0",
.codex-editor .ml-0 {
margin-left: 0;
}
.codex-editor .ml-1 {
margin-left: .25em;
}
.codex-editor .ml-2 {
margin-left: .5em;
}
.codex-editor .ml-3 {