Skip to content

Instantly share code, notes, and snippets.

Avatar

叶丹波 yedanbo

View GitHub Profile
@yedanbo
yedanbo / Context.sublime-menu
Last active May 14, 2016
移动设备检测函数(JS)
View Context.sublime-menu
[
{
"caption": "创建 Gist 代码片段",
"children": [
{
"command": "gist",
"caption": "创建公开的 Gist"
},
{
"command": "gist_private",
@yedanbo
yedanbo / createRandom().js
Last active Jun 18, 2021
生成不重复的随机数函数(JS)
View createRandom().js
// 生成随机数函数
function createRandom(num,from,to)
{
var arr=[]; // 随机数数组
var json={}; // 标记json对象
while(arr.length<num)
{
// 产生单个随机数
var ranNum=Math.round(Math.random()*(to-from))+from;
// 通过判断json对象的索引值是否存在 来标记 是否重复
@yedanbo
yedanbo / CSScomb.sublime-settings
Last active May 29, 2020
CSScomb用户配置文件(JSON)
View CSScomb.sublime-settings
{
// If plugin has trouble finding Node.js, replace this string with path
// to your `node` bin
"node-path" : ":/usr/local/bin",
// Full list of supported options and acceptable values can be found here:
// https://github.com/csscomb/csscomb.js/blob/master/doc/options.md
"config": {
// Whether to add a semicolon after the last value/mixin.
@yedanbo
yedanbo / Default (Windows).sublime-keymap
Created Mar 4, 2016
Sublime Text 用户自定义快捷键配置文件(JSON)
View Default (Windows).sublime-keymap
[
// SidebarEnhancement
// Chrome
{ "keys": ["f12"],
"command": "side_bar_files_open_with",
"args": {
"paths": [],
"application": "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe",
"extensions":".*"
}
@yedanbo
yedanbo / reset-style.css
Last active Mar 4, 2016
重置浏览器元素的一些默认属性样式(CSS)
View reset-style.css
/* RESET STYLE */
/** 清除内外边距 **/
body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td, img {
margin: 0;
border: medium none;
padding: 0;
}
/** 设置默认字体 **/
body, button, input, select, textarea {
font: 12px/1.5 ,tahoma, Srial, helvetica, sans-serif;
@yedanbo
yedanbo / SublimeLinter.sublime-settings
Created May 13, 2016
SublimeLinter 用户配置文件
View SublimeLinter.sublime-settings
{
"user": {
"debug": false,
"delay": 0.25,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Blueberry/round/Blueberry - round.gutter-theme",
"gutter_theme_excludes": [],
"installed_packages": [
"HTML-CSS-JS Prettify",
"Node Completions",
View Main.sublime-menu
[
{
"id": "plugins",
"children": [
{
"caption": "SublimeServer 服务器",
"children": [
{
"command": "sublimeserver_start",
"caption": "启动服务器"
@yedanbo
yedanbo / Terminal.sublime-settings
Created May 14, 2016
Terminal 用户设置文件
View Terminal.sublime-settings
{
"terminal": "C:\\Program Files (x86)\\Git\\git-bash.exe",
"parameters": []
}
@yedanbo
yedanbo / TortoiseSVN.sublime-settings
Created May 14, 2016
TortoiseSVN 用户设置文件
View TortoiseSVN.sublime-settings
{
// Auto close update dialog when no errors, conflicts and merges
"autoCloseUpdateDialog": false,
"tortoiseproc_path": "C:\\Program Files (x86)\\TortoiseSVN\\bin\\TortoiseProc.exe"
}
@yedanbo
yedanbo / SublimeLinter.sublime-settings
Created May 14, 2016
SublimeLinter 用户配置文件
View SublimeLinter.sublime-settings
{
"user": {
"debug": false,
"delay": 0.25,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Blueberry/round/Blueberry - round.gutter-theme",
"gutter_theme_excludes": [],
"installed_packages": [
"HTML-CSS-JS Prettify",
"Node Completions",