Skip to content

Instantly share code, notes, and snippets.

@isbasex
isbasex / components.md
Created August 6, 2018 08:20 — forked from iclanzan/components.md
UI Component Name Ideas

UI component names

As front-end developers we all know the pain of coming up with meaningful component names for CSS classes. I created this gist as a place to collect terms that are suitable as user interface component names.

Please contribute your own ideas!

Interactive components

  • button
@isbasex
isbasex / isBot.js
Last active August 17, 2019 11:10
isBot
const isBot = ua => /bot|spider|crawler|robot|crawling|slurp/i.test(ua)
@isbasex
isbasex / mock-image.js
Last active October 23, 2017 08:58
Image Generator for node.js
const express = require('express')
const app = express()
const { createCanvas } = require('canvas')
const SIZE = 1080
const DEFAULT_COLOR = '#e3e3e3'
app.get('*', (req, res) => {
const { h, w, c, text, fc } = req.query
const width = Number(w) || SIZE
@isbasex
isbasex / is-android-and-low-browser.js
Last active June 17, 2017 03:02
检测是否为 Android 平台国产浏览器
function isAndroidAndLowBrowser() {
var ua = navigator.userAgent.toLowerCase()
return [
'qqbrowser',
'baidu',
'liebao',
'micromessenger',
'ucbrowser',
'360'
].some(function(name) {
@isbasex
isbasex / ct-submit.py
Last active February 18, 2017 15:32 — forked from rraptorr/ct-submit.py
Simple Certificate Transparency certificate submission client
#!/usr/bin/python
import sys
import argparse, json, base64, struct
import urllib2
from datetime import datetime
LOGS = {
'pilot': 'https://ct.googleapis.com/pilot',
'rocketeer': 'https://ct.googleapis.com/rocketeer',