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 / sublime-command-line.md
Created July 16, 2017 15:17 — forked from adrianorsouza/sublime-command-line.md
launch sublime text from the command line

Launch Sublime Text from the command line on OSX

Sublime Text includes a command line tool, subl, to work with files on the command line. This can be used to open files and projects in Sublime Text, as well working as an EDITOR for unix tools, such as git and subversion.

Requirements

  • Sublime text 2 or 3 installed in your system within Applications folder

Setup

@thelebster
thelebster / emoji_test.rb
Created July 16, 2017 12:39 — forked from holman/emoji_test.rb
A snapshot of the tests we use internally at GitHub to help edit our blog posts before they go out to everybody. For more information, take a peek at http://zachholman.com/posts/how-github-writes-blog-posts
require_relative "test_helper"
require "open-uri"
require "net/http"
class EmojiTest < Blog::Test
def test_no_emoji
posts.each do |post|
content = File.read(post)
refute_match /:[a-zA-Z0-9_]+:/, content,
@thelebster
thelebster / multiple_ssh_setting.md
Created July 13, 2017 02:13 — forked from RichardBronosky/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@thelebster
thelebster / multiple_ssh_setting.md
Created July 13, 2017 02:10 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
drush config-export --skip-modules=devel,kint,stage_file_proxy
@thelebster
thelebster / gulpfile.js
Created July 11, 2017 18:10 — forked from szeidler/gulpfile.js
Gulp files for Drupal theming (including clever drush cache clearing)
/**
* Gulp file for Drupal theming, including clever drush cache clearing.
*
* Usage in docker4drupal environment: `gulp --docker`
* It ensures, that drush is executed from the php container.
*/
var gulp = require('gulp');
var argv = require('yargs').argv;
var plumber = require('gulp-plumber');
@thelebster
thelebster / drush-sql-dump.sh
Created July 11, 2017 18:09 — forked from szeidler/drush-sql-dump.sh
drush sql-dump
drush sql-dump --structure-tables-list=ctools_object_cache,ctools_css_cache,cache,cache_field,cache_form,cache_filter,cache_menu,cache_page,cache_views,cache_views_data,history,sessions,watchdog > ~/backup/database/backup-20170303.sql
@thelebster
thelebster / drupal7-nginx-with-fotoweb.conf
Created July 11, 2017 18:08 — forked from szeidler/drupal7-nginx-with-fotoweb.conf
Nginx configuration for Fotoweb image style processing
server {
server_name SERVER_NAME;
listen 80;
root /var/www/html/;
index index.php;
fastcgi_keep_conn on;
fastcgi_index index.php;
fastcgi_param QUERY_STRING $query_string;
@thelebster
thelebster / nginx.default.conf
Created July 7, 2017 16:51 — forked from sumardi/nginx.default.conf
Install PHP-FPM, Nginx & MySQL on EC2 with Amazon Linux AMI
# Install linux update, followed by GCC and Make
sudo yum -y update
sudo yum install -y gcc make
# Install Nginx and PHP-FPM
sudo yum install -y nginx php-fpm
# Install PHP extensions
sudo yum install -y php-devel php-mysql php-pdo \
php-pear php-mbstring php-cli php-odbc \
@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.