Skip to content

Instantly share code, notes, and snippets.

View thelebster's full-sized avatar
:octocat:
Do nothing, it is ok.

Anton Lebedev thelebster

:octocat:
Do nothing, it is ok.
View GitHub Profile
@thelebster
thelebster / Dockerfile
Created May 6, 2017 10:23 — forked from james2doyle/Dockerfile
Dockerfile for the latest node.js version running in Elastic Beanstalk docker
# Define image we want to build from
FROM node:7.9
# Setup the directory structure for our web app
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Get the deps - only if not included in the deploy!!
# COPY package.json /usr/src/app/
# RUN npm install
@thelebster
thelebster / timercam.sh
Created May 6, 2017 10:23 — forked from james2doyle/timercam.sh
A script for taking a picture using the Raspberry Pi webcam tool and then using rsync to send those files to a remote server
#!/bin/bash
# must have fswebcam installed
command -v fswebcam >/dev/null 2>&1 || {
echo "I require fswebcam but it's not installed. Aborting." >&2; exit 1;
}
# must have rsync installed
command -v rsync >/dev/null 2>&1 || {
echo "I require rsync but it's not installed. Aborting." >&2; exit 1;
#!/usr/bin/env php
<?php
/**
* This script will download and install https://github.com/pantheon-systems/wp-native-php-sessions
* on your Pantheon Wordpress site.
*
* Works on Macintosh / Linux.
*
* Usage:
*
@thelebster
thelebster / formspree.html
Created May 19, 2017 06:55 — forked from manfromanotherland/formspree.html
JS: Ajax send forms using the most excellent Formspree » http://formspree.io #snippet
<form id="contact-form" action="//formspree.io/your@email.com" method="post">
<input type="text" name="Name" placeholder="Name" required>
<input type="email" name="Email" placeholder="Email" required>
<textarea name="Message" cols="30" rows="6" placeholder="Message" required></textarea>
<!-- CONFIG -->
<input class="is-hidden" type="text" name="_gotcha">
<input type="hidden" name="_subject" value="Subject">
<input type="hidden" name="_cc" value="email@cc.com">
<!-- /CONFIG -->
<input class="submit" type="submit" value="Send">
@thelebster
thelebster / convert-svg-png
Created June 29, 2017 10:33 — forked from dustintheweb/convert-svg-png
Batch Convert SVG to PNG (transparent/ alpha) using ImageMagick
// ImageMagick - Convert SVG to PNG w/ transparency
//
// - open terminal
//
// - confirm you have imagemagick installed
// --- type: convert -v
//
// - cd to folder
//
// - single file
@thelebster
thelebster / README.md
Created June 30, 2017 18:35 — forked from hofmannsven/README.md
PHP and Xdebug (Notes on OS X, VVV and MAMP)
@thelebster
thelebster / GIF-Screencast-OSX.md
Created July 4, 2017 12:39 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

# Before Script
before_script:
- composer self-update
- composer install --prefer-dist > /dev/null
- cp .env.example .env
- php artisan key:generate
- php artisan migrate:refresh
# Services
services:
@thelebster
thelebster / .bash_profile
Created July 5, 2017 03:54 — forked from iolson/.bash_profile
Bash Profile
# Quicker navigation
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias ......="cd ../../../../.."
alias .......="cd ../../../../../.."
# Aliases
alias ll='ls -l'
@thelebster
thelebster / ngrok-install.md
Created July 6, 2017 06:34
Expose localhost to the internet with Ngrok

Expose Localhost to the Internet With Ngrok

If you want a way to access your localhost easily on the public internet, lets say, to showcase the current work to a client, etc. This is where ngrok comes in. It allows us to establish a tunnel that forwards a port on our machine and make it available on the internet.

Ngrok is a Go program, distributed as a single executable file for all major desktop platforms. There are no additional frameworks to install or other dependencies.

This tutorial assumes you are using MAMP and have previously set up DNSMASQ.