snippets 用词来分隔网址等。

用词来分隔网址等。

break-words.snippets
/* to allow URLs to wrap */
		overflow-wrap: break-word;
		word-wrap: break-word!important;
		-ms-word-break: break-all;
		word-break: break-all;
		-webkit-hyphens: auto;
		-moz-hyphens: auto;
		hyphens: auto;

snippets 第n个孩子

第n个孩子

nth-child.snippets
li:nth-last-child(1):nth-child(odd) {width: 100%;}

or

li:last-child:not(:nth-child(even)){ width: 100%; }


/*
make last item do something but only if it's odd-numbered 
(so like a 7-item menu in responsive view 
-- 7th one will be 100% but if there are 6, they'll all be 50% 
*/

snippets php get-current-page-url

php get-current-page-url

php get current page url.snippets
function getUrl() {
  $url  = @( $_SERVER["HTTPS"] != 'on' ) ? 'http://'.$_SERVER["SERVER_NAME"] :  'https://'.$_SERVER["SERVER_NAME"];
  $url .= ( $_SERVER["SERVER_PORT"] !== 80 ) ? ":".$_SERVER["SERVER_PORT"] : "";
  $url .= $_SERVER["REQUEST_URI"];
  return $url;
}

snippets GET-RID-的白色闪光 - 当 - iframe的负载

GET-RID-的白色闪光 - 当 - iframe的负载

get-rid-of-white-flash-when-iframe-loads.snippets
<iframe style="visibility:hidden;" onload="this.style.visibility = 'visible';" src="../examples/inlineframes1.html" > </iframe>

snippets 点击()

点击()

click.snippets
$( "#target" ).click(function() {
  alert( "Handler for .click() called." );
});

snippets CF7预制下拉片段

CF7预制下拉片段

cf7-country.snippets
[select* prospect-country "United States" "Canada" "Mexico" "United Kingdom" "-----" "Afghanistan" "Albania" "Algeria" "American Samoa" "Andorra" "Angola" "Anguilla" "Antigua and Barbuda" "Argentina" "Armenia" "Armenia" "Aruba" "Australia" "Austria" "Azerbaijan" "Azerbaijan" "Bahamas" "Bahrain" "Bangladesh" "Barbados" "Belarus" "Belgium" "Belize" "Benin" "Bermuda" "Bhutan" "Bolivia" "Bonaire" "Bosnia and Herzegovina" "Botswana" "Bouvet Island (Bouvetoya)" "Brazil" "British Indian Ocean Territory (Chagos Archipelago)" "British Virgin Islands" "Brunei Darussalam" "Bulgaria" "Burkina Faso" "Burundi" "Cambodia" "Cameroon" "Cape Verde" "Cayman Islands" "Central African Republic" "Chad" "Chile" "China" "Christmas Island" "Cocos (Keeling) Islands" "Colombia" "Comoros" "Congo" "Congo" "Cook Islands" "Costa Rica" "Cote d'Ivoire" "Croatia" "Cuba" "Curaçao" "Cyprus" "Cyprus" "Czech Republic" "Denmark" "Djibouti" "Dominica" "Dominican Republic" "Ecuador" "Egypt" "El Salvador" "Equatorial Guinea" "Eritrea" "Estonia" "Ethiopia" "Falkland Islands (Malvinas)" "Faroe Islands" "Fiji" "Finland" "France" "French Guiana" "French Polynesia" "French Southern Territories" "Gabon" "Gambia" "Georgia" "Georgia" "Germany" "Ghana" "Gibraltar" "Greece" "Greenland" "Grenada" "Guadeloupe" "Guam" "Guatemala" "Guernsey" "Guinea" "Guinea-Bissau" "Guyana" "Haiti" "Heard Island and McDonald Islands" "Holy See (Vatican City State)" "Honduras" "Hong Kong" "Hungary" "Iceland" "India" "Indonesia" "Iran" "Iraq" "Ireland" "Isle of Man" "Israel" "Italy" "Jamaica" "Japan" "Jersey" "Jordan" "Kazakhstan" "Kazakhstan" "Kenya" "Kiribati" "Korea" "Korea" "Kuwait" "Kyrgyz Republic" "Lao People's Democratic Republic" "Latvia" "Lebanon" "Lesotho" "Liberia" "Libyan Arab Jamahiriya" "Liechtenstein" "Lithuania" "Luxembourg" "Macao" "Macedonia" "Madagascar" "Malawi" "Malaysia" "Maldives" "Mali" "Malta" "Marshall Islands" "Martinique" "Mauritania" "Mauritius" "Mayotte" "Micronesia" "Moldova" "Monaco" "Mongolia" "Montenegro" "Montserrat" "Morocco" "Mozambique" "Myanmar" "Namibia" "Nauru" "Nepal" "Netherlands" "Netherlands Antilles" "New Caledonia" "New Zealand" "Nicaragua" "Niger" "Nigeria" "Niue" "Norfolk Island" "Northern Mariana Islands" "Norway" "Oman" "Pakistan" "Palau" "Palestinian Territory" "Panama" "Papua New Guinea" "Paraguay" "Peru" "Philippines" "Pitcairn Islands" "Poland" "Portugal" "Puerto Rico" "Qatar" "Reunion" "Romania" "Russian Federation" "Rwanda" "Saint Barthelemy" "Saint Helena" "Saint Kitts and Nevis" "Saint Lucia" "Saint Martin" "Saint Pierre and Miquelon" "Saint Vincent and the Grenadines" "Samoa" "San Marino" "Sao Tome and Principe" "Saudi Arabia" "Senegal" "Serbia" "Seychelles" "Sierra Leone" "Singapore" "Sint Maarten (Netherlands)" "Slovakia (Slovak Republic)" "Slovenia" "Solomon Islands" "Somalia" "South Africa" "South Georgia & S. Sandwich Islands" "Spain" "Sri Lanka" "Sudan" "Suriname" "Svalbard & Jan Mayen Islands" "Swaziland" "Sweden" "Switzerland" "Syrian Arab Republic" "Taiwan" "Tajikistan" "Tanzania" "Thailand" "Timor-Leste" "Togo" "Tokelau" "Tonga" "Trinidad and Tobago" "Tunisia" "Turkey" "Turkey" "Turkmenistan" "Turks and Caicos Islands" "Tuvalu" "U.S. Virgin Islands" "U.S. Minor Outlying Islands" "Uganda" "Ukraine" "United Arab Emirates" "Uruguay" "Uzbekistan" "Vanuatu" "Venezuela" "Vietnam" "Wallis and Futuna" "Western Sahara" "Yemen" "Zambia" "Zimbabwe"]
cf7-states.snippets
[select* prospect-state include_blank "Alabama|AL" "Alaska|AK" "Arizona|AZ" "Arkansas|AR"
 "California|CA" "Colorado|CO" "Connecticut|CT" "Delaware|DE"
 "Washington DC|DC" "Florida|FL" "Georgia|GA" "Hawaii|HI"
 "Idaho|ID" "Illinois|IL" "Indiana|IN" "Iowa|IA" "Kansas|KS"
 "Kentucky|KY" "Louisiana|LA" "Maine|ME"  "Maryland|MD"
 "Massachusetts|MA" "Michigan|MI" "Minnesota|MN" "Mississippi|MS"
 "Missouri|MO" "Montana|MT" "Nebraska|NE" "Nevada|NV"
 "New Hampshire|NH" "New Jersey|NJ" "New Mexico|NM" "New York|NY"
 "North Carolina|NC" "North Dakota|ND" "Ohio|OH" "Oklahoma|OK"
 "Oregon|OR" "Pennslyvania|PA" "Rhode Island|RI"
 "South Carolina|SC" "South Dakota|SD" "Tennessee|TN"
 "Texas|TX" "Utah|UT" "Vermont|VT" "Virginia|VA" "Washington|WA"
 "West Virginia|WV" "Wisconsin|WI" "Wyoming|WY" "---" "Alberta|AB" "British Columbia|BC" "Manitoba|MB" "New Brunswick|NB" "Newfoundland|NL" "Nova Scotia|NS" "Northwest Territories|NT" "Nunavut|NU" "Ontario|ON" "Prince Edward Island|PE" "Quebec|QC" "Saskatchewan|SK" "Yukon|YT"  "---" "Other"]
cf7-years.snippets
[select prospect-gradYr include_blank "2016" "2015" "2014" "2013" "2012" "2011" "2010" "2009" "2008" "2007" "2006" "2005" "2004" "2003" "2002" "2001" "2000" "1999" "1998" "1997" "1996" "1995" "1994" "1993" "1992" "1991" "1990" "1989" "1988" "1987" "1986" "1985" "1984" "1983" "1982" "1981" "1980" "1979" "1978" "1977" "1976" "1975" "1974" "1973" "1972" "1971" "1970" "1969" "1968" "1967" "1966" "1965" "1964" "1963" "1962" "1961" "1960" "1959" "1958" "1957" "1956" "1955" "1954" "1953" "1952" "1951" "1950" "1949" "1948" "1947" "1946" "1945" "1944" "1943" "1942" "1941" "1940" "1939" "1938" "1937" "1936" "1935" "1934" "1933" "1932" "1931" "1930" "1929" "1928" "1927" "1926" "1925" "1924" "1923" "1922" "1921" "1920" "1919" "1918" "1917" "1916" "1915" "1914" "1913" "1912" "1911" "1910" "1909" "1908" "1907" "1906" "1905" "1904" "1903" "1902" "1901"]

snippets 正则表达式只选择两位数字。

正则表达式只选择两位数字。

two_digit.snippets

# Two working possibilities
# Select all two digit numbers.  e.g. 28px (selects 28); 180px doesn't match;
# credit to this S.O question: http://stackoverflow.com/questions/11933484/regex-match-2-digits-0-to-9


(?<![0-9])[0-9]{2}(?![0-9])

(?<!\d)\d{2}(?!\d)

snippets 基本

基本

basic-development-tools.snippets
Network Panel 
Hard refresh command + shift + R


-----------

click on the file on the file command save to save locally

right click 

local modifications
save as (to save new file)

-----------




snippets Wordpress:排队全局样式和脚本

Wordpress:排队全局样式和脚本

Wordpress: enqueue_global.snippets
// enqueue global styles and scripts
function tp_enqueue_scripts() {
	wp_enqueue_style( 'style', get_stylesheet_uri() );
	wp_enqueue_script( 'scripts', get_template_directory_uri() . '/scripts.js', array( 'jquery' ) ); 
}  
add_action('wp_enqueue_scripts', 'tp_enqueue_scripts');

snippets CSS:重置meyerweb.com

CSS:重置meyerweb.com

CSS: reset.snippets
/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}