Skip to content

Instantly share code, notes, and snippets.

View ratankr39's full-sized avatar

Ratan Rapolu ratankr39

  • Sunnyvale, California, USA
View GitHub Profile
@ratankr39
ratankr39 / mysql cheatsheet.md
Last active September 24, 2016 12:56 — forked from apolloclark/mysql cheatsheet.md
mysql cheatsheet

MySQL Cheatsheet

This is a collection of the most common commands I run while administering Mysql databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Mysql has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.

Setup

installation, Ubuntu 14.04

https://help.ubuntu.com/14.04/serverguide/mysql.html

sudo apt-get update
@ratankr39
ratankr39 / new_gist_file.txt
Created August 8, 2016 08:58
Permissions issue for Node modules (npm, bower, grunt, gulp etc)
Run below code
sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config
Should be fine
@ratankr39
ratankr39 / README.md
Created December 28, 2015 12:57 — forked from oodavid/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
/*
==============================================
CSS3 ANIMATION CHEAT SHEET
==============================================
Made by Justin Aguilar
www.justinaguilar.com/animations/
Questions, comments, concerns, love letters:
@ratankr39
ratankr39 / genymotionwithplay.txt
Created December 13, 2015 06:14 — forked from wbroek/genymotionwithplay.txt
Genymotion with Google Play Services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
@ratankr39
ratankr39 / MySQL cheat sheet.sql
Last active December 17, 2015 18:52 — forked from macmladen/MySQL cheat sheet.sql
MySQL commands
# Some _user_ manipulating commands on _database_ (exchange for real data)
CREATE USER '_user_'@'localhost' IDENTIFIED BY '_password_';
GRANT ALL PRIVILEGES ON _database_.* TO '_user_'@'localhost';
SELECT CONCAT(QUOTE(user),'@',QUOTE(host)) UserAccount FROM mysql.user;
SHOW GRANTS FOR '_user_'@'localhost';
# Finding duplicate values http://stackoverflow.com/questions/688549/finding-duplicate-values-in-mysql
SELECT myfield, COUNT(*) AS c FROM mytable GROUP BY myfield HAVING c > 1;
SELECT * FROM mytable WHERE myfield IN (SELECT myfield FROM mytable GROUP BY myfield HAVING COUNT(myfield)>1)
@ratankr39
ratankr39 / sync-gists.rb
Created November 29, 2015 18:04 — forked from mikehale/sync-gists.rb
Sync all your gists to local disk
#!/usr/bin/env ruby
require 'excon'
require 'json'
module EnumerableEnumerator
def self.included(base)
base.extend ClassMethods
# SYNTAX:
var pattern = new RegExp(pattern, attributes); # attributes: g (global); i (case-sensitive); m (multiline matches)
var pattern = /pattern/attributes; # same as above
# BRACKETS:
[...]: Any one character between the brackets.
[^...]: Any one character not between the brackets.
# NPM CheatSheet.
# Super easy intall: npm comes with node now.
# To create your own npm package: https://www.npmjs.org/doc/misc/npm-developers.html
# More: https://www.npmjs.org/doc/
# 1. NPM Command Lines.
# Local mode is the default.
# Use --global or -g on any command to operate in global mode instead.
// Node.js CheatSheet.
// Download the Node.js source code or a pre-built installer for your platform, and start developing today.
// Download: http://nodejs.org/download/
// More: http://nodejs.org/api/all.html
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html