Skip to content

Instantly share code, notes, and snippets.

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

Sergey Bruhin sergeybruhin

🏠
Working from home
View GitHub Profile
@tilboerner
tilboerner / mail.php
Last active April 3, 2017 10:54
A validated PHP contact form, using https://github.com/PHPMailer/PHPMailer
<?php
//
// A validated PHP contact form
// http://blog.surmodernite.de/2013/12/a-validated-php-contact-form
//
// The MIT License (MIT)
// Copyright (c) 2013 tilman.boerner@gmx.net
// Permission is hereby granted, free of charge, to any person obtaining a copy
@glebcha
glebcha / gulpfile.js
Last active July 22, 2020 11:05
Gulp task with Less processing (autoprefixer), live reload (browser-sync), javascript (es6, babelify, react), error handling, images optimization, jade templates
'use strict';
/*
Instructions:
1 - Should execute 'npm run prepare'
before the very first run, it will install and symlink all dependencies.
2 - Choose between production 'npm start' and development 'npm run start-dev' modes
(watcher will run immediately after initial run).
@vitorbritto
vitorbritto / rm_mysql.md
Last active June 29, 2024 20:26
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

    brew remove mysql
    
@davidrushton
davidrushton / Kernel.php
Created February 17, 2016 17:29
Laravel 5 Database Queue - Shared Hosting
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
@williammincy
williammincy / form.pug
Last active August 12, 2017 16:22
pug mixin for easy form field creation
mixin inputText(id, label, val)
div.row
label(for= id)= label
input(type="text", name= id, id= id, value= val,autocomplete="off")
mixin inputPassword(id, label, val)
div.row
label(for= id)= label
input(type="password", name= id, id= id, value= val,autocomplete="off")
@nrollr
nrollr / MySQL_macOS_Sierra.md
Last active June 7, 2024 20:53
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@AtulKsol
AtulKsol / db_backup_commands.md
Last active May 31, 2024 20:19
Commands to backup & restore database
  1. pg_dump is a nifty utility designed to output a series of SQL statements that describes the schema and data of your database. You can control what goes into your backup by using additional flags.
    Backup: pg_dump -h localhost -p 5432 -U postgres -d mydb > backup.sql

    Restore: psql -h localhost -p 5432 -U postgres -d mydb < backup.sql

    -h is for host.
    -p is for port.
    -U is for username.
    -d is for database.