Skip to content

Instantly share code, notes, and snippets.

View vagusX's full-sized avatar
🎯
Focusing

vagusX vagusX

🎯
Focusing
View GitHub Profile
body {
font-size: 0.14rem;
}
/* @media screen and (max-width: 320px) {
body {
font-size: 14px;
}
}
@vagusX
vagusX / Super-Media-Query.css
Created May 20, 2016 05:44 — forked from kmokidd/Super-Media-Query.css
iPhone family. Main Android. Wechat and QQ's X5
// --------------------------MQ--------------------------//
/* iPhone4 iPhone5/5s
* 超级低端 Android
*/
@media (max-device-width: 320px){
}
/* Especially for iPhone4 */
@media (max-device-width: 320px) and (max-device-height: 480px) and (-webkit-min-device-pixel-ratio: 2){
}
@vagusX
vagusX / flex
Created May 20, 2016 05:44 — forked from kmokidd/flex
Adapt android 2.1+ WebView, thanks https://github.com/stevenbenisek/compass-flexbox
/* display:flex; */
.flex { display: -webkit-box; display: -moz-box; display: -ms-flexbox; display: -webkit-flex; display: flex; }
/* row reverse */
.flex.flex--reverse { -webkit-box-orient: horizontal; -moz-box-orient: horizontal; -webkit-box-direction: reverse; -moz-box-direction: reverse; -webkit-flex-direction: row-reverse; -ms-flex-direction: row-reverse; flex-direction: row-reverse; }
/* column */
.flex--clo { -webkit-box-orient: vertical; -moz-box-orient: vertical; -webkit-box-direction: normal; -moz-box-direction: normal; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; }
/* column reverse*/
.flex--col.flex--reverse { -webkit-box-orient: vertical; -moz-box-orient: vertical; -webkit-box-direction: reverse; -moz-box-direction: reverse; -webkit-flex-direction: column-reverse; -ms-flex-direction: column-reverse; flex-direction: column-reverse; }
/* 子元素之间间距 */
.flex--justify-content--space-between { -webkit-box-pack: justify; -moz-box-pack: justify; -ms-flex-pack: justify
handleChange = field => {
return e => {
const value = e.target ? e.target.value : e;
const newFormData = { ...this.state.formData };
newFormData[field] = value;
this.setState({
formData: newFormData
});
};
}
@vagusX
vagusX / material
Created July 27, 2016 12:47
sublime config
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"caret_extra_width": 2,
"caret_style": "phase",
"close_windows_when_empty": false,
"color_scheme": "Packages/User/Material-Theme.tmTheme",
"copy_with_empty_selection": false,
"drag_text": false,
"draw_minimap_border": true,
@vagusX
vagusX / flux.js
Created September 21, 2016 08:38 — forked from acdlite/flux.js
A Redux-like Flux implementation in <75 lines of code
/**
* Basic proof of concept.
* - Hot reloadable
* - Stateless stores
* - Stores and action creators interoperable with Redux.
*/
import React, { Component } from 'react';
export default function dispatch(store, atom, action) {
@vagusX
vagusX / sublime
Created October 9, 2016 02:57
configs
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"caret_extra_width": 2,
"caret_style": "phase",
"close_windows_when_empty": false,
"color_scheme": "Packages/User/Material-Theme.tmTheme",
"copy_with_empty_selection": false,
"drag_text": false,
"draw_minimap_border": true,
@vagusX
vagusX / open subl in terminal
Created November 3, 2016 05:15
mac configs
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
@vagusX
vagusX / proxy chains config
Created November 6, 2016 07:27
useful collection
# from https://github.com/haad/proxychains/blob/master/src/proxychains.conf
# proxychains.conf VER 4
#
# HTTP, SOCKS4, SOCKS5 tunneling proxifier with DNS.
#
# The option below identifies how the ProxyList is treated.
# only one option should be uncommented at time,
# otherwise the last appearing option will be accepted
@vagusX
vagusX / Dorm-network.scpt
Created November 8, 2016 02:44 — forked from Jeff2Ma/Dorm-network.scpt
Automatic proxy configuration set pac file with applescript & shell script http://devework.com/automatic-proxy-configuration-pac-applescript.html
tell application "System Events"
tell network preferences
do shell script "scselect 'Dorm'"
do shell script "sudo networksetup -setairportpower AirPort on" user name "用户名" password "密码" with administrator privileges
do shell script "open /Applications/Shad**socksX.app" user name “用户名" password "密码" with administrator privileges
end tell
end tell