Skip to content

Instantly share code, notes, and snippets.

@solotimes
solotimes / index.html
Created December 3, 2018 07:57
Vue.js DnD
<div id="some-list" class="q" droppable="true" v-on="dragover:dragover, drop:drop">
<div v-repeat="items" draggable="true" v-on="dragstart:dragstart, dragend:dragend, dragover:dragover, dragenter:dragenter">{{text}}</div>
</div>
<div id="placeholder">placeholder</div>
</div>
@solotimes
solotimes / 0_reuse_code.js
Last active August 29, 2015 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@solotimes
solotimes / deploy.rb
Created December 28, 2013 11:23 — forked from jeronimo/deploy.rb
set :sync_directories, ["public/system/images"]
set :sync_backups, 3
set :db_file, "mongoid.yml"
set :db_drop, '--drop' # drop database (rewrites everything)
@solotimes
solotimes / _mixins.css.scss
Created November 29, 2013 07:12
#snip scss mixins
@mixin box-shadow($h:0,$v:0,$blur:3px,$color: #AAA){
-moz-box-shadow: $h $v $blur $color;
-webkit-box-shadow: $h $v $blur $color;
box-shadow: $h $v $blur $color;
}
@mixin border-radius($value:3px){
-moz-border-radius: $value;
border-radius: $value;
}
@solotimes
solotimes / reset.css
Created November 21, 2013 06:32
reset css #snip
/*
HTML5 Reset :: style.css
----------------------------------------------------------
We have learned much from/been inspired by/taken code where offered from:
Eric Meyer :: http://ericmeyer.com
HTML5 Doctor :: http://html5doctor.com
and the HTML5 Boilerplate :: http://html5boilerplate.com
-------------------------------------------------------------------------------*/
@solotimes
solotimes / application.html.slim
Last active December 28, 2015 22:59
html slim layout #snip
doctype html
<!--[if lt IE 7]><html class="no-js ie6 lt-ie10 lt-ie9 lt-ie8 lt-ie7"><![endif]-->
<!--[if IE 7]><html class="no-js ie7 lt-ie10 lt-ie9 lt-ie8"><![endif]-->
<!--[if IE 8]><html class="no-js ie8 lt-ie10 lt-ie9"><![endif]-->
<!--[if IE 9]><html class="no-js ie9 lt-ie10"><![endif]-->
<!--[if gt IE 9]><!--> <html class="no-js"><!--<![endif]-->
head
meta charset="utf-8"
meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"
title Title
@solotimes
solotimes / hosts#2012-11-06
Created November 8, 2012 06:01
hosts#2012-11-06
#Google Services START
74.125.128.199 a-oz-opensocial.googleusercontent.com
74.125.128.199 accounts.google.com
74.125.128.199 android.clients.google.com
74.125.128.199 accounts.google.com
74.125.128.199 ajax.googleapis.com
74.125.128.199 android.clients.google.com
74.125.128.199 android.l.google.com
74.125.128.199 appengine.google.com
74.125.128.199 base0.googleh74.125.128.199osted.com
@solotimes
solotimes / taiji_spec_v2.md
Created May 9, 2012 04:56
中国太极数字钟表项目SPEC V2.0

中国太极数字钟表项目SPEC V2.0

概述

  1. 平台兼容性:

    • iOS 4.0 及以上
    • iphone/ipad 将开发不同版本程序
    • android 2.2 及以上 , 各主流分辨率将开发不同版本程序
    • android 初步定位为 800X480 960X640 480X320 320X240 4个主流分辨率
    • android 兼容性以开发环境中的模拟器为准, 如需支持特定机型, 需要委托方提供测试设备
  • 各类桌面操作系统 (能够兼容flash player V10.0 及以上版本) 程序将使用Adobe Air开发
@solotimes
solotimes / example.js
Created April 29, 2012 06:55
javascript truncate filename
var s = 'this-is-a-very-very-very-long-file-name.jpg';
console.log(truncate(s, 100)); //this-is-a-very-very-very-long-file-name.jpg
console.log(truncate(s, 10)); //this-is-a-[...].jpg
console.log(truncate(s, 4)); //this[...].jpg