Skip to content

Instantly share code, notes, and snippets.

View deven003's full-sized avatar

Devendra Verma deven003

View GitHub Profile
cordova plugin add https://github.com/brodysoft/Cordova-SQLitePlugin.git
@jgoux
jgoux / app.js
Created April 15, 2014 14:53
Ionic / AngularJS service wrapper for Web SQL API / SQLite-Cordova-Plugin
angular.module('myApp', ['ionic', 'myApp.services', 'myApp.controllers'])
.run(function(DB) {
DB.init();
});
@zaherg
zaherg / install.md
Last active October 18, 2020 17:45
a small tips to install latest nginx , php 5.5 & laravel 4.1 since that Laravel 4.1 has been released, i have removed the line which explain how to install laravel from dev branch using composer.

Creating Your Laravel & nginx Server

We will install Larave 4.1 with PHP5.5 & Latest nginx on Ubuntu 12.04.3 x64.

updating your system

apt-get update && apt-get upgrade
adduser [username]
usermod -aG sudo [username]
apt-get -y install git
@bradmontgomery
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active April 1, 2024 11:21
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@gmergoil
gmergoil / MySqlConnector.php
Created June 2, 2013 09:08
A revised version of the Illuminate\Database\Connectors\MySqlConnector of the Laravel 4 framework. It fixes a bug when using the unix_socket option in the database configuration.
<?php namespace Illuminate\Database\Connectors;
class MySqlConnector extends Connector implements ConnectorInterface {
/**
* Establish a database connection.
*
* @param array $options
* @return PDO
*/
@ankitnetwork18
ankitnetwork18 / gist:4509792
Created January 11, 2013 10:56
mysql: dump of indian cities and states
-- phpMyAdmin SQL Dump
-- version 2.11.6
-- http://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Generation Time: Jan 11, 2013 at 04:24 PM
-- Server version: 5.0.51
-- PHP Version: 5.2.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
@Steven-Rose
Steven-Rose / gist:3943830
Created October 24, 2012 04:27
VI: Select all + delete, select all + copy
Select all and delete (actually move to buffer)
:%d
Select all and copy to buffer
:%y
Use p to paste the buffer.
@sgmurphy
sgmurphy / url_slug.php
Created July 12, 2012 15:52
URL Slugs in PHP (with UTF-8 and Transliteration Support)
<?php
/**
* Create a web friendly URL slug from a string.
*
* Although supported, transliteration is discouraged because
* 1) most web browsers support UTF-8 characters in URLs
* 2) transliteration causes a loss of information
*
* @author Sean Murphy <sean@iamseanmurphy.com>
* @copyright Copyright 2012 Sean Murphy. All rights reserved.