Skip to content

Instantly share code, notes, and snippets.

Avatar

Devendra Verma deven003

View GitHub Profile
View addsqlite.sh
cordova plugin add https://github.com/brodysoft/Cordova-SQLitePlugin.git
@jgoux
jgoux / app.js
Created Apr 15, 2014
Ionic / AngularJS service wrapper for Web SQL API / SQLite-Cordova-Plugin
View app.js
angular.module('myApp', ['ionic', 'myApp.services', 'myApp.controllers'])
.run(function(DB) {
DB.init();
});
@zaherg
zaherg / install.md
Last active Oct 18, 2020
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.
View install.md

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 Oct 22, 2021
Steps to install a Comodo PositiveSSL certificate with Nginx.
View install-comodo-ssl-cert-for-nginx.rst

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 Jun 2, 2013
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.
View MySqlConnector.php
<?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 Jan 11, 2013
mysql: dump of indian cities and states
View gist:4509792
-- 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 Oct 24, 2012
VI: Select all + delete, select all + copy
View gist:3943830
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 Jul 12, 2012
URL Slugs in PHP (with UTF-8 and Transliteration Support)
View url_slug.php
<?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.