Skip to content

Instantly share code, notes, and snippets.

View sekayasin's full-sized avatar
🎯
Every git commit counts! #Topooooowa

sekayasin sekayasin

🎯
Every git commit counts! #Topooooowa
View GitHub Profile
MYSQL
-----------
Run this on the command line. Not in mysql console.
eg. $alberta_makeever: mysql -u root -p user_development << sample.sql
mysql5 -u root -p
enter password:kwame1
mysql> exit;
Create a database on the sql server.
CREATE DATABASE profs;
USE profs;
CREATE TABLE professors (
name varchar(30) NOT NULL,
specialization varchar(20),
salary double(8,2),
CONSTRAINT prof_pk PRIMARY KEY (name));
CREATE TABLE students (

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
{
"files":
{
"Backbone.js": "http://backbonejs.org/backbone.js",
"CSS-reset": "http://meyerweb.com/eric/tools/css/reset/reset.css",
"Less.js": "https://raw.github.com/cloudhead/less.js/master/dist/less-1.3.3.min.js",
"RegEx: xregexp.com": "http://cdnjs.cloudflare.com/ajax/libs/xregexp/2.0.0/xregexp-min.js",
"cycle": "http://malsup.github.com/jquery.cycle.all.js",
"html5shiv": "https://raw.github.com/aFarkas/html5shiv/master/dist/html5shiv.js",
"infinite_scroll": "https://raw.github.com/paulirish/infinite-scroll/master/jquery.infinitescroll.min.js",
/*
Swift Programming Language Guide
"A Swift Tour" Solutions
https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/GuidedTour.html#//apple_ref/doc/uid/TP40014097-CH2-XID_1
These are the solutions to all the "experiments" in the pre-release Swift Programming Guide.
You should be able to copy-paste it into your own playground. Let me know if I screwed
any of them up, and I'll be happy to update this gist.
*/
@sekayasin
sekayasin / ubuntu_agnoster_install.md
Created December 2, 2017 08:28 — forked from renshuki/ubuntu_agnoster_install.md
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

here is my main nginx.conf
----------------------------------------------------------------------------------------------------
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
include /usr/share/nginx/modules/*.conf;
events {
@sekayasin
sekayasin / index.html
Created September 3, 2018 06:11 — forked from CodeMyUI/index.html
Responsive Navigation Menu Using Only CSS
<h1><span>Responsive Navigation Menu</span> Using Only CSS</h1>
<header>
<section>
<a href="https://www.linkedin.com/in/sutharmayur" id="logo" target="_blank">Mayur Suthar</a>
<label for="toggle-1" class="toggle-menu"><ul><li></li> <li></li> <li></li></ul></label>
<input type="checkbox" id="toggle-1">
<nav>