Skip to content

Instantly share code, notes, and snippets.

View dingyiming's full-sized avatar

ding dingyiming

View GitHub Profile
@xiadd
xiadd / app.js
Last active February 13, 2017 02:07
小程序示例
//app.js
App({
onLaunch: function () {
//获取当前位置,配合地图sdk使用
wx.getLocation({
type: 'wgs84', // 默认为 wgs84 返回 gps 坐标,gcj02 返回可用于 wx.openLocation 的坐标
success: function(res){
wx.request({
url: 'https://dev.xiadd.me/api/user/location',
data: res,

###石墨整体架构一览 ####前端篇

#####框架 石墨的前端使用的框架很传统:jQuery + RequireJS,我们使用RequireJS的text模块引入模板,手动用代码渲染数据,没有使用AngularJS之类的MV*框架的原因是自己编写的js更灵活,拓展性更好。框架们的功能都很强大,但是当遇到一些复杂依赖或者性能问题时,坑往往会很深。

#####环境结构

在生产环境下

// paste in your console
speechSynthesis.onvoiceschanged = function() {
var msg = new SpeechSynthesisUtterance();
msg.voice = this.getVoices().filter(v => v.name == 'Cellos')[0];
msg.text = Object.keys(window).join(' ');
this.speak(msg);
};
@iflamed
iflamed / index.js
Created September 20, 2015 14:57
Laravel gulp webpack watch the vuejs vue file
// this.registerWatcher('webpack', [config.assetsDir + '/**/*.js',config.assetsDir + '/**/*.vue']);
var gulp = require('gulp'),
webpack = require('gulp-webpack'),
gulpIf = require('gulp-if'),
uglify = require('gulp-uglify'),
gulpIgnore = require('gulp-ignore'),
_ = require('underscore'),
elixir = require('laravel-elixir'),
utilities = require('laravel-elixir/ingredients/commands/Utilities'),
notification = require('laravel-elixir/ingredients/commands/Notification');
@wanming
wanming / gist:61365afc17b6cfed5487
Created July 6, 2015 07:27
石墨架构概览

###石墨整体架构一览 ####前端篇

#####框架 石墨的前端使用的框架很传统:jQuery + RequireJS,我们使用RequireJS的text模块引入模板,手动用代码渲染数据,没有使用AngularJS之类的MV*框架的原因是自己编写的js更灵活,拓展性更好。框架们的功能都很强大,但是当遇到一些复杂依赖或者性能问题时,坑往往会很深。

#####环境结构

在生产环境下

@bobbygrace
bobbygrace / trello-css-guide.md
Last active April 22, 2024 10:15
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?