Skip to content

Instantly share code, notes, and snippets.

View amcsi's full-sized avatar
🏠
Working from home

Attila Szeremi amcsi

🏠
Working from home
View GitHub Profile
@svpernova09
svpernova09 / README.md
Created October 24, 2017 18:01
How to test Homestead & Hyper-V

Prerequisities:

  • Ensure you have Windows 10 & The Fall Creators Update installed.
  • Uninstall Virtualbox
  • Enable Hyper-V
  • Create a new Virtual Switch in Hyper-V that is type "External" (You'll use this whenever asked)

Edit Homestead

Add / edit these 2 lines in your Homestead.yaml

FROM python:2.7-alpine
MAINTAINER Nick Janetakis <nick.janetakis@gmail.com>
ENV INSTALL_PATH /bsawf
RUN mkdir -p $INSTALL_PATH
WORKDIR $INSTALL_PATH
COPY requirements.txt requirements.txt
RUN apk add --no-cache --virtual .build-deps \
@sebmarkbage
sebmarkbage / Enhance.js
Last active January 31, 2024 18:33
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@lebedov
lebedov / sshtunnel.sh
Created February 24, 2014 14:10
Functions for managing ssh tunnels in bash
#!/bin/bash
# Add these functions to your ~/.bashrc file.
function mktunnel {
if [[ $* == '' ]] || [[ $1 == '-h' ]]; then
echo 'Usage: mktunnel LOCALPORT REMOTEPORT REMOTEHOST'
else
ssh -fCNL $1:localhost:$2 $3;
fi