This file contains 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 makeStyle(defaults, tagName) { | |
tagName = tagName || 'div'; | |
var Style = React.createClass({ | |
getDefaultProps: function() { | |
return assign({}, defaults); | |
}, | |
render: function() { | |
var style = assign({}, this.props); | |
delete style.children; |
This file contains 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
// Non-JSX and React.createClass | |
import {createClass, createElement, PropTypes} from 'react'; | |
import css from './Application.css'; | |
export default createClass({ | |
displayName: 'Application', | |
propTypes: { | |
title: PropTypes.string | |
}, | |
handleClick(): void { |
This file contains 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
// Here is btree.inl, which is the thing you would write yourself. | |
// Unlike C++ templates, the granularity of these lightweight templates is at the | |
// module level rather than the function or class level. You can think of it like | |
// ML functors (parameterized modules) except that there isn't any static checking | |
// of signatures (in that respect, it's like C++ templates). In my view, this style | |
// of parameterized generative modules is generally the better conceptual framework. | |
// This is a completely valid C file even prior to preprocessing, so during library | |
// development you can just include this file directly. That is a big win for testing |
This file contains 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
package main | |
import ( | |
"fmt" | |
"strings" | |
"database/sql" | |
) | |
const ( | |
SQL_INSERT = "INSERT INTO %s (%s) VALUES (%s)" |
This file contains 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, { Component } from 'react'; | |
import ReactDOM from 'react-dom'; | |
import './index.css'; | |
import registerServiceWorker from './registerServiceWorker'; | |
class Dynamic extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { module: null }; | |
} |
This file contains 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
{% extends "custom_base.html" %} | |
{% block content %} | |
<form id="defaults" > | |
<input name="csrfmiddlewaretoken" type="hidden" value="{{ csrf_token }}"> | |
</form> | |
<table> | |
{% for row in items %} |
This file contains 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
startup_message off | |
hardstatus on | |
hardstatus alwayslastline | |
hardstatus string "%{.bW}%-w%{..G}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a" |
This file contains 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
# Based on: | |
# https://web.archive.org/web/20200212121848/http://www.zackarychapple.guru/chrome/2016/08/24/chrome-headless.html | |
# https://www.chromium.org/developers/how-tos/get-the-code | |
# https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md | |
apt-get update | |
apt-get install -y curl git htop man unzip vim wget python | |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git | |
export PATH=$PATH:`pwd`/depot_tools | |
mkdir Chromium && cd Chromium |
This file contains 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
package main | |
import ( | |
"container/list" | |
"flag" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"log" | |
"net/http" |
This file contains 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
#!/usr/bin/env bash | |
set -e | |
# Author: Ravi Teja Pothana (@RaviTezu) | |
# Date: Nov 15, 2016 | |
# The MIT License (MIT) | |
# Copyright (c) 2016 RaviTezu |
OlderNewer