Skip to content

Instantly share code, notes, and snippets.

View theskillwithin's full-sized avatar
😝
yay

Austin Peterson theskillwithin

😝
yay
View GitHub Profile
@theskillwithin
theskillwithin / if.js
Created November 15, 2016 21:18 — forked from Siilwyn/if.js
Multiple ways to handle the platform: switch vs. if...else vs. object
var getConfigDirectory = function () {
var platform = process.platform;
if (platform === 'linux') {
return process.env.XDG_CONFIG_HOME || path.join(home(), '.config')
}
else if (platform === 'darwin') {
return path.join(home(), 'Library', 'Preferences');
}
else if (platform === 'win32') {
{
"added_words":
[
"Mockup",
"plugins",
"coffeescript",
"sourcemaps",
"html",
"plugin",
"init",
@theskillwithin
theskillwithin / 0_reuse_code.js
Created February 1, 2017 18:44
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@theskillwithin
theskillwithin / login.jsx
Last active July 26, 2017 18:29
Prototype style
import PropTypes from 'prop-types'
class Login extends React.Component {
constructor(props) {
super(props)
this.state = {}
}
render() {
return (
<div>
```
reddit-init.en.Aej55dTt0xA.js:5 Not sending debug log; already sent 3
queueLog @ reddit-init.en.Aej55dTt0xA.js:5
(index):1 Uncaught TypeError: subscribe is not a function
at HTMLAnchorElement.onclick ((index):1)
reddit-init.en.Aej55dTt0xA.js:5 Client Error: "TypeError: subscribe is not a function" thrown at L1:36381 in https://www.reddit.com/r/Breath_of_the_Wild/ Message: "Uncaught TypeError: subscribe is not a function" Object
```
```
reddit-init.en.Aej55dTt0xA.js:5 Client Error: "TypeError: open_menu is not a function" thrown at L1:9686 in https://www.reddit.com/r/Breath_of_the_Wild/ Message: "Uncaught TypeError: open_menu is not a function" {tag: "unknown"}
import React from 'react'
import configureStore from 'redux-mock-store'
import { shallow } from 'enzyme'
import Page from 'components/Page'
import { Provider } from 'react-redux'
const mockStore = configureStore({
cobrand: '',
user: {},
activeInstalls: false,
{
"plugins": [
[
"module-resolver",
{
"root": [
"."
],
"alias": {
"styles": "./styles"
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Формы</title>
<script type="text/javascript">
//unction Na(){}
number = function() { this.hasNumber == number }