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
Show hidden characters
{ | |
"presets": [ | |
"es2015", | |
"react" | |
] | |
} |
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
#!/bin/bash | |
# Activate a version of Node that is read from a text file via NVM | |
function use_node_version() | |
{ | |
local TEXT_FILE_NAME="$1" | |
local CURRENT_VERSION=$([ -n "$HAS_NVM" ] && nvm current) | |
local PROJECT_VERSION=$([ -n "$HAS_NVM" ] && nvm version $(cat "$TEXT_FILE_NAME")) | |
# If the project file version is different than the current version |
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
# Add folder and filename to tab title | |
atom.workspace.observeTextEditors (editor) -> | |
if editor.getTitle() isnt "untitled" | |
sp = editor.getPath().split('/') | |
title = sp.slice(sp.length-2).join('/') | |
editor.getTitle = -> title | |
editor.getLongTitle = -> title | |
editor.emitter.emit "did-change-title", editor.getTitle() | |
atom.workspace.onDidOpen (event) -> |
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
# Insert these at the beginning of an existing sshd_config file | |
KexAlgorithms curve25519-sha256@libssh.org | |
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr | |
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-ripemd160-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160,umac-128@openssh.com | |
Protocol 2 | |
HostKey /etc/ssh/ssh_host_ed25519_key | |
HostKey /etc/ssh/ssh_host_rsa_key | |
PasswordAuthentication no | |
ChallengeResponseAuthentication no |
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 css from './Header.css' | |
class Header extends Component { | |
componentDidMount () { | |
this._bindScroll() |
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
// Todo store | |
// | |
// Requiring the Dispatcher, Constants, and | |
// event emitter dependencies | |
import AppDispatcher from '../dispatcher/AppDispatcher'; | |
import { TodoConstants } from '../constants/TodoConstants'; | |
import { EventEmitter } from 'events'; | |
const CHANGE_EVENT = 'change'; |
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
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
* @flow | |
*/ | |
import React, { PureComponent } from 'react' | |
import { | |
Button, | |
Image, |
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
gcloud container clusters create cluster-1 \ | |
--num-nodes 1 \ | |
--disk-size 10 \ | |
--machine-type f1-micro \ | |
--no-enable-cloud-logging \ | |
--no-enable-cloud-monitoring | |
# When it's done, your kubectl command should work | |
kubectl cluster-info |
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 com.example.myapp; | |
import android.app.Application; | |
import com.facebook.react.ReactApplication; | |
import cl.json.RNSharePackage; | |
import cl.json.ShareApplication; | |
import com.facebook.react.ReactNativeHost; |
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
# On OSX, install brew for all the things | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# Install Brew Caskroom | |
brew install caskroom/cask/brew-cask | |
# Install Google Cloud SDK | |
brew cask install google-cloud-sdk | |
# After installing, follow the printed instructions to add the paths |
NewerOlder