Skip to content

Instantly share code, notes, and snippets.

@P233
P233 / getAttributes.js
Created February 7, 2021 13:56
Get SVG attributes which contains capital letter
Array.from(document.querySelector(".index").querySelectorAll("code > a")).reduce((a, c) => { if (c.innerHTML !== c.innerHTML.toLowerCase()) return `${a}\n ":${c.innerHTML.toLowerCase()}" ":${c.innerHTML}"`; else return a;}, "(def attribute-replacements [") + "])";
@P233
P233 / .postcssrc.json
Created November 28, 2018 03:09
My postcss-sorting configuration
{
"map": false,
"syntax": "postcss-scss",
"plugins": {
"postcss-sorting": {
"properties-order": [
"font",
"font-family",
"font-size",
"font-weight",
@P233
P233 / SassMeister-input-HTML.html
Created July 31, 2014 09:52
Generated by SassMeister.com.
<div class="container">
<div class="grid">
<div class="red"></div>
</div>
<div class="grid">
<div class="red"></div>
</div>
<div class="grid">
<div class="red"></div>
</div>
@P233
P233 / SassMeister-input.scss
Created July 31, 2014 08:53
Generated by SassMeister.com.
// ----
// Sass (v3.4.0.rc.2)
// Compass (v1.0.0.alpha.21)
// ----
$value-1: one;
$value-2: two;
$list-1: one two;
@P233
P233 / gist:25aaf6b16b8a85cef7e0
Created July 28, 2014 23:19
Can't setup wifi dongle for raspberry pi
[root@alarmpi netctl]# lsusb
Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[root@alarmpi netctl]# lsmod
Module Size Used by
cfg80211 440121 0
snd_soc_wm8804 7908 0
snd_soc_pcm512x 8984 0
@P233
P233 / SassMeister-input.scss
Created July 4, 2014 16:53
Generated by SassMeister.com.
// ----
// Sass (v3.3.9)
// Compass (v1.0.0.alpha.20)
// ----
$var: null;
@for $i from 1 through 5 {
$var: $var, $i $i;
}
@P233
P233 / ios7-theme-for-v2ex
Last active December 9, 2016 07:51
体积稍大,需要压缩: http://cssminifier.com/
a:link, a:visited, a:active {
color: #8e8d93;
-webkit-transition: all .15s;
-moz-transition: all .15s;
-ms-transition: all .15s;
-o-transition: all .15s;
transition: all .15s;
}
a.top:link, a.top:visited, a.top:active {
color: #000;
@P233
P233 / gist:5835561
Last active December 18, 2015 19:49
Symphony CMS debug bookmarklet
javascript:(function() {
var link = location.toString();
if (link.slice(-6) != "?debug") {
location.href = link + "?debug";
} else {
location.href = link.substring(0,link.length-6);
}
})();
// minified