Skip to content

Instantly share code, notes, and snippets.

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

Chirag Parekh chiragparekh

🏠
Working from home
View GitHub Profile
@chiragparekh
chiragparekh / gist:9990000
Created April 5, 2014 10:15
Copy MySQL Table Structure with Data
CREATE TABLE new_table_name LIKE table_name;
INSERT new_table_name SELECT * FROM table_name;
@chiragparekh
chiragparekh / Jquery dotdotdot
Created May 30, 2014 07:35
Jquery dotdotdot add Read More Link
JS CODE
//init dotdotdot
$(".reason").dotdotdot({
ellipsis : ' [...] ',
wrap : 'word',
after : "a.read_more",
watch : true,
height : 95,
callback : function( isTruncated, orgContent ) {
List of MOC Keys
enter -- starts playing
s -- stops playing
n -- plays next item from the playlist
b -- plays previous item from the playlist
space -- pause
p -- pause
S -- plays at random
R -- repeats the same song in a loop,
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=8117e7c7-6701-48f0-a8ce-428ded7a4a90 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
@chiragparekh
chiragparekh / angularjs-providers-explained.md
Last active September 9, 2015 14:34 — forked from demisx/angularjs-providers-explained.md
AngularJS Providers: Constant/Value/Service/Factory/Decorator/Provider
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant

@chiragparekh
chiragparekh / .Xdefaults
Last active September 22, 2015 07:04 — forked from yevgenko/.Xdefaults
URxvt settings with solarized theme
!-------------------------------------------------------------------------------
! Xft settings
!-------------------------------------------------------------------------------
Xft.dpi: 96
Xft.antialias: false
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight
@chiragparekh
chiragparekh / sublime-text-3-build-3065-license.md
Created December 22, 2015 17:05
Sublime Text 3 (build 3065+) - VALID License

SublimeText3 Valid License without cracking! Just download/install then use this license.

Notice that it may not work on dev builds, but still works on 3083 build!

----- BEGIN LICENSE -----

Andrew Weber
Single User License
EA7E-855605
813A03DD 5E4AD9E6 6C0EEB94 BC99798F
@chiragparekh
chiragparekh / BlogController.php
Created December 26, 2015 13:13 — forked from tobysteward/BlogController.php
Laravel AJAX Pagination with JQuery
<?php
class BlogController extends Controller
{
/**
* Posts
*
* @return void
*/
public function showPosts()
@chiragparekh
chiragparekh / import-variation.php
Created January 26, 2016 12:07 — forked from galalaly/import-variation.php
Create WooCommerce variations with PHP
<?php
// In a class constructor
$this->size_tax = wc_attribute_taxonomy_name( 'Size' );
$this->color_tax = wc_attribute_taxonomy_name( 'Color' );
// Insert the main product first
// It will be used as a parent for other variations (think of it as a container)
$product_id = wp_insert_post( array(
@chiragparekh
chiragparekh / gist:423daa5eedf9ddb0b2b772f4fdc1bd1c
Created June 6, 2016 06:07
Sublime Text 2 - Useful Shortcuts

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