Skip to content

Instantly share code, notes, and snippets.

View FlatMapIO's full-sized avatar
😭
Focusing

dong.huo FlatMapIO

😭
Focusing
View GitHub Profile
const groupName = '美区服务'
const usServices = [
'claude.ai',
'anthropic.com',
'openai.com',
'adobe.com',
'adobe.io',
'meta.ai',
'hume.ai',
@FlatMapIO
FlatMapIO / gen-icons.ts
Last active June 13, 2023 10:30
generate qwik svg icons
import * as fs from 'node:fs'
import * as path from 'node:path'
import { startCase } from 'lodash-es'
import { format } from 'prettier'
import * as Rx from 'rxjs'
import * as svgo from 'svgo'
import config from './iconset'
@FlatMapIO
FlatMapIO / github-blocks.js
Last active March 31, 2023 04:17
Add a Button for the Github page to open in https://blocks.githubnext.com
// ==UserScript==
// @name Gitbub Blocks
// @namespace https://github.com/
// @version 1.0
// @description Add a button to replace github.com with block.githubnext.com in the URL bar on GitHub repositories page
// @author https://twitter.com/stackobserve
// @match https://github.com/*/*
// @grant window.onurlchange
// ==/UserScript==
enum Code {
// Not an error; returned on success
//
// HTTP Mapping: 200 OK
OK = 0;
// The operation was cancelled, typically by the caller.
//
// HTTP Mapping: 499 Client Closed Request
CANCELLED = 1;
@FlatMapIO
FlatMapIO / discourse.md
Last active March 25, 2018 10:31
discourse up and running
@FlatMapIO
FlatMapIO / faker.d.ts
Last active January 14, 2016 09:58
faker.js.d.ts
declare module '//cdnjs.cloudflare.com/ajax/libs/Faker/3.0.1/locales/zh_CN/faker.zh_CN.min.js' {
export = Faker;
}
declare namespace Faker {
namespace address {
function zipCode(format?:string);
declare module 'react-grid-layout' {
import * as React from 'react'
export namespace utils {
type Maybe<T> = T | undefined
type LayoutItemRequired = { w: number, h: number, x: number, y: number, i: string }
type LayoutItem =
{ minW ?: number, minH ?: number, maxW ?: number, maxH ?: number, moved ?: boolean, static ?: boolean, isDraggable?: boolean, isResizable?: boolean }
& LayoutItemRequired
@FlatMapIO
FlatMapIO / settings.json
Created December 3, 2015 15:32
VSCode Settings
// Place your settings in this file to overwrite the default settings
{
"editor.fontFamily": "Source Code Pro",
"editor.fontSize": 14,
"editor.formatOnType": true,
"go.gopath": "/Users/X/Workspace/GOPATH",
"rust.rustLangSrcPath": "/usr/local/src/rust/src",
"rust.racerPath": "/Users/X/.multirust/toolchains/nightly/cargo/bin/racer",
  1. General Background and Overview
@FlatMapIO
FlatMapIO / unsafe.scala
Created February 26, 2015 09:29
Get Unsafe util
def unsafe: Unsafe = {
val field = classOf[Unsafe].getDeclaredField("theUnsafe")
field.setAccessible(true)
field.get(null)
val unsafe = field.asInstanceOf[Unsafe]
unsafe
}