Skip to content

Instantly share code, notes, and snippets.

@ekancepts
ekancepts / wp-svn-git.md
Created April 11, 2014 10:52
Wordpress-svn-git

I am trying to develop and maintain a project in Wordpress.

I am preferring git for 'version control'

I am cloning Wordpress core as git submodule in my local system.

I separated wp-content folder,wp-config.php,index.php from wordpress core folder and placed them outside the folder.

Updated the index and wp-config files appropriately to make this work.

@ekancepts
ekancepts / zf2user.md
Last active August 29, 2015 14:00
ZFCuser error

Installed following modules by adding to composer

  • zfc-user
  • zfc-user-doctrine-orm
  • doctrine-orm-module

Add following to application.config.php

  • 'DoctrineModule',
  • 'DoctrineORMModule',
@ekancepts
ekancepts / gist:62ef8662d843bcef0f09
Created July 10, 2014 06:36
ngtable pagination
/* js controller */
this.updateTableParams = function (data) {
$scope.colorsTableParams = new ngTableParams({
page: 1,
count: 10
}, {
total: data.length,
getData: function($defer, params) {
$defer.resolve(data.slice((params.page() - 1) * params.count(), params.page() * params.count()));
}
/* js controller */
$scope.selms = {};
$scope.selbs = {};
$scope.selmos = {};
$http.get(
'vehicle-manufacturers'
).success(function(data){
console.log(data);
$scope.selms = data;
})
@ekancepts
ekancepts / ang-lar.md
Last active August 29, 2015 14:08
Sending url params from angular to laravel

routes.js

           $routeProvider.when('/leads/:id/edit', {
                      templateUrl: '/leads/:id/edit',
                      controller: 'LeadEditController',
                      factory: ['LeadFactory'],
                      resolve: {
                          load: ['$q', '$rootScope',
                              function ($q, $rootScope) {

var deferred = $q.defer();

@ekancepts
ekancepts / audio-arch-linux
Last active August 29, 2015 14:15
audio in archlinux
I am using Archlinux on ASUS X550L Laptop
My System hardware specifications are
*************************************************************
➜ ~ sudo lshw -short
H/W path Device Class Description
=====================================================
system X550LC (ASUS-NotebookSKU)
/0 bus X550LC
@ekancepts
ekancepts / aplay-output
Created March 2, 2015 16:20
audio in archlinux
~ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
@ekancepts
ekancepts / destroy-sample-data.php
Created October 15, 2012 20:45 — forked from mgirouard/destroy-sample-data.php
A quick hack to destroy all sample data in an OpenCart catalog.
<?php
$options = getopt('p:');
$prefix = empty($options['p'])
? realpath('.')
: realpath($options['p']);
if (empty($prefix)) {
die("Bad prefix. Try again.\n");
}
@ekancepts
ekancepts / _grid-system.scss
Created November 1, 2012 14:02 — forked from chriseppstein/_grid-system.scss
Building Responsive Layouts with Sass
@import "compass/utilities/general/clearfix";
$gutter-width: 10px; // All grids systems have the same gutter width
$float-direction: left;
$left-gutter-width: ceil($gutter-width / 2) !default;
$right-gutter-width: $gutter-width - $left-gutter-width !default;
$base-line-height: 21px;
$show-grid-background: false;
@mixin centered {
# Error-1
DEPRECATION WARNING on line 21 of /var/www/projects/local-dev/sass/project_responsive/sass/_media-handheld.scss:
@extending an outer selector from within @media is deprecated.
You may only @extend selectors within the same directive.
This will be an error in Sass 3.3.
It can only work once @extend is supported natively in the browser.
# Error-2
DEPRECATION WARNING on line 24 of /var/www/projects/local-dev/sass/project_responsive/sass/_media-handheld-landscape.scss:
@extending an outer selector from within @media is deprecated.