Skip to content

Instantly share code, notes, and snippets.

View tiger8888's full-sized avatar
🎯
Focusing

tiger8888

🎯
Focusing
View GitHub Profile
@loilo
loilo / pass-slots.md
Last active February 20, 2025 09:47
Vue: Pass Slots through from Parent to Child Components

Vue: Pass Slots through from Parent to Child Components

The Situation

  • We've got some components A, B and C which provide different slots.
    const A = {
      template: `<div><slot name="a">Default A Content</slot></div>`
    }

const B = {

@tupunco
tupunco / Go 语言学习.md
Last active April 3, 2023 01:51
Go 语言学习
{
"scripts": {
"dev": "webpack-dev-server --hot --open",
"dist": "rm -rf public && NODE_ENV=production webpack --config webpack-dist.config.js --display-optimization-bailout",
"jbdist": "tnpm i && NODE_ENV=production webpack --config webpack-dist.config.js"
},
"dependencies": {
"babel-runtime": "^6.23.0",
"badjs-report": "^1.3.2",
"classnames": "^2.2.5",
@brianneisler
brianneisler / cheat-sheet.js
Last active November 27, 2022 08:23
Cheat sheet - es6 import/export mixed with require/modules.exports
require('./module.js') // { a: 1 }
import module from './module.js' // undefined
import { a } from './module.js' // 1
require('./module2.js') // { default: { a: 1 }, b: 2 }
import module2 from './module2.js' // { a: 1}
import { b } from './module2.js' // 2
require('./module3.js') // { default: { a: 1 }, b: 2 }
Axure RP 7.0注册码
用户名:axureuser
序列号:8wFfIX7a8hHq6yAy6T8zCz5R0NBKeVxo9IKu+kgKh79FL6IyPD6lK7G6+tqEV4LG
@andelf
andelf / Monad.swift
Last active February 18, 2017 00:29
Monad in Swift
// Monad
operator infix >>= {
precedence 10
associativity left
}
struct _MReturn {
}
@transparent func _mreturn<Args>(a: Args) -> (_MReturn, Args) {
return (_MReturn(), a)
@cirocosta
cirocosta / iframe.html
Last active January 6, 2024 23:02
Sending messages from child iframe to parent webpage
<!DOCTYPE html>
<html>
<head>
<title>My Iframe</title>
</head>
<body>
<button>Botão</button>
<script type="text/javascript">
@font-face {
font-family: 'cicle_gorditagordita';
src: url('fonts/Cicle_Gordita-webfont.eot');
src: url('fonts/Cicle_Gordita-webfont.eot?#iefix') format('embedded-opentype'),
url('fonts/Cicle_Gordita-webfont.woff') format('woff'),
url('fonts/Cicle_Gordita-webfont.ttf') format('truetype'),
url('fonts/Cicle_Gordita-webfont.svg#cicle_gorditagordita') format('svg');
font-weight: normal;
font-style: normal;
@julienchazal
julienchazal / LESS mixin for CSS arrow
Created April 18, 2014 13:29
LESS mixin for CSS arrow
/* ------------------------ */
/* LESS mixin for CSS arrow */
/* ------------------------ */
/* https://github.com/HugoGiraudel/LESS-Mixin-for-CSS-arrows
//Usage
.arrow(size, color, direction, offset, border-size, border-color);
Where
@garrettdreyfus
garrettdreyfus / yesOrNo.py
Last active November 18, 2024 11:01
Dead simple python function for getting a yes or no answer.
def yes_or_no(question):
reply = str(raw_input(question+' (y/n): ')).lower().strip()
if reply[0] == 'y':
return True
if reply[0] == 'n':
return False
else:
return yes_or_no("Uhhhh... please enter ")