Skip to content

Instantly share code, notes, and snippets.

View cycold's full-sized avatar

cy cycold

  • ShenZhen, China
View GitHub Profile
@cycold
cycold / json.js
Created August 20, 2014 07:51
json解析
if( typeof( data ) === 'string' ) {
dataTemp1 = JSON.parse( data );
dataTemp2 = $.parseJSON( data );
dataTemp3 = eval('(' + data + ')' );
}
@cycold
cycold / gist:e0a286b130a6e727dabb
Last active August 29, 2015 14:05
placehold-IMG
<img src="http://fpoimg.com/155x260?text=Palcehold-1&bg_color=bdd080">
<img src="http://fpoimg.com/155x260?text=Palcehold-2&bg_color=d45d59">
<img src="http://fpoimg.com/155x260?text=Palcehold-3&bg_color=d49259">
@cycold
cycold / for-retunr.js
Created August 7, 2014 03:57
For 循环中的if中return语句
for( var i=0; i<10; i++ ){
if( i == 5 ){
console.log(i);
return i; //这里return后,后面的代码就不会执行了,即使是在if语句中
}
console.log(i);
}
@cycold
cycold / sublime_project.conf
Created August 4, 2014 07:55
sblime_text项目配置文件
{
"folders":
[
{
"follow_symlinks": true,
"path": "F:\\web\\web_gits\\sassIce"
}
],
"settings":
{
@cycold
cycold / httpd.conf
Created August 4, 2014 07:51
Xampp apache config
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
<!doctype html>
<html>
<head>
<!-- Run in full-screen mode. -->
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- Make the status bar black with white text. -->
<meta name="apple-mobile-web-app-status-bar-style" content="black">
@cycold
cycold / some.js
Created August 1, 2014 06:54
cdn备胎
<script src="http://cdn.staticfile.org/jquery/2.1.0/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="/jquery.min.js"><\/script>')</script>
@cycold
cycold / sublime.config
Created August 1, 2014 01:03
sublimeText
{
"auto_complete_commit_on_tab": false,
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/User/Monokai (SL).tmTheme",
"copy_with_empty_selection": false,
"default_encoding": "UTF-8",
"dictionary": "Packages/Language - English/en_US.dic",
"drag_text": false,
"draw_white_space": "wide",
@cycold
cycold / SassMeister-input-HTML.html
Created July 31, 2014 09:29
Generated by SassMeister.com.
<div class="div visuallyhidden">
asdasd
</div>
@cycold
cycold / SassMeister-input.scss
Created July 31, 2014 09:04
Generated by SassMeister.com.
// ----
// Sass (v3.3.12)
// Compass (v1.0.0.alpha.21)
// ----
$list:#111,#222,#333;
@function pxToem($px,$base:16){
@return ( $px / $base ) * 1em
};
div{