This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <style type="text/css"> | |
| .block { | |
| border: 1px solid red; | |
| min-height: 1px; | |
| } | |
| </style> | |
| <div id="mount"></div> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.6.1/react.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { makeActionCreator, makeMergeReducer } from './helpers'; | |
| import 'whatwg-fetch'; | |
| const endpoint = process.env.ENDPOINT; | |
| const makeAction = makeActionCreator(endpoint, fetch); | |
| export default { | |
| actions: { | |
| // make action for redux-thunk | |
| clusters: makeAction('clusters', 'clusters/'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| const Count = ({ value, ...props }) => { | |
| if (value === 0) { | |
| return <noscript />; | |
| } else { | |
| return <span {...props}>({value})</span>; | |
| } | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| setxkbmap -layout dvp,ru | |
| setxkbmap -option grp:caps_toggle | |
| xrdb ~/.Xresources | |
| sudo netctl start wlp5s1-FRESH_OFFICE & | |
| chromium & | |
| telegram-desktop & |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { PropTypes } from 'react'; | |
| const Actionable = React.createClass({ | |
| propTypes: { | |
| component: PropTypes.any.isRequired, | |
| eventName: PropTypes.string.isRequired, | |
| handler: PropTypes.func.isRequired, | |
| }, | |
| handle() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function render(location, props) { | |
| return <span>{location.pathname}</span>; | |
| } | |
| const ShowPathname = (props) => ( | |
| <LocationSubscriber {...props} render={render} /> | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "LedControl.h" | |
| #define FIELD_SIZE 8 | |
| #define MAX_LENGTH 16 | |
| LedControl lc(12, 10, 11, 1); | |
| typedef struct { | |
| byte x, y; | |
| } Position; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <title>Site Maintenance</title> | |
| <style> | |
| body { text-align: center; padding: 150px; } | |
| h1 { font-size: 50px; } | |
| body { font: 20px Helvetica, sans-serif; color: #333; } | |
| article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
| a { color: #dc8100; text-decoration: none; } | |
| a:hover { color: #333; text-decoration: none; } | |
| </style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript:!function(b){var c=[].map.call(document.querySelectorAll("tbody.order-item-wraper"),function(a){var b=a.querySelector(".first-row .info-body").innerHTML.trim(),c=a.querySelector(".baobei-name").innerHTML.trim(),d=a.querySelector(".order-status .f-left").innerHTML.trim(),e=parseFloat(a.querySelector(".amount-num").innerHTML.match(/[0-9,]+/)[0]);return[b,'"'+c+'"',e,d].join(",")});data=localStorage.getItem(b)||"",data+=c.join("\n")+"\n",localStorage.setItem(b,data),document.querySelector(".ui-pagination-next").click()}("aliData"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'pg' | |
| stock_conn = PG.connect(dbname: ARGV[0] || 'inventoring_development') | |
| entrepot_conn = PG.connect(dbname: ARGV[1] || 'organic_development') | |
| stock_conn.exec('select id, name, ignore_in_reports from reasons').each do |c| | |
| entrepot_conn.exec_params('insert into write_off.reasons (id, name, ignore_in_reports) values ($1, $2, $3)', c.values) | |
| end | |
| stock_conn.exec('select id, name, description, COALESCE(status, 0) from vendors').each do |c| |