Skip to content

Instantly share code, notes, and snippets.

View nicolasguzca's full-sized avatar
Learning, improving, growing, helping

Nick nicolasguzca

Learning, improving, growing, helping
View GitHub Profile
cordova plugin add https://github.com/brodysoft/Cordova-SQLitePlugin.git
@nicolasguzca
nicolasguzca / dvss.sh
Created March 19, 2017 13:33
Data video install script on Linux Server
#!/bin/sh
sudo apt-get update && sudo apt-get install -y php5-fpm php5-cli && sudo wget "http://updates.datavideo.co.uk/dvss_1.8.0-1ubuntu15_amd64.deb" -O dvss-core.deb && sudo wget "http://updates.datavideo.co.uk/dvss-webui_1.03-1_all.deb" -O dvss-gui.deb && sudo dpkg -i "dvss-core.deb" && sudo dpkg -i "dvss-gui.deb" && echo "DATAVIDEO STREAM SERVER INSTALL COMPLETE"
#!/bin/sh
@nicolasguzca
nicolasguzca / filename.py
Created April 4, 2017 21:02
A simple python script that outputs to a file the contents of a directory ( name and file type)
#this is the way to call the script and save it to a file
#python script.py > ../predicas.json
#!/usr/bin/env python
import os
import errno
def path_hierarchy(path):
Fixes for phpmyadmin (configuration storage and some extended features)
If you're tired of the message "The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated", this patch for you ;-)
What do you get?
- Tracking pages (version control MySQL table structure and data);
- Bookmarks allow you to save predefined queries and execute them later;
- You can show recently used tables in the navigation panel. It helps you jump across the table directly, without the need to select the database and the table;
- Triggers - code which is automatically executed in response to certain events.
- Designer mode (visually display your tables and a graphical way of creating, editing, and displaying phpMyAdmin relations);
DROP FUNCTION IF EXISTS proper;
SET GLOBAL log_bin_trust_function_creators=TRUE;
DELIMITER |
CREATE FUNCTION proper( str VARCHAR(128) )
RETURNS VARCHAR(128)
BEGIN
DECLARE c CHAR(1);
DECLARE s VARCHAR(128);
DECLARE i INT DEFAULT 1;
DECLARE bool INT DEFAULT 1;

Please read the new and updated version.

Sendy

Sendy is a self hosted email newsletter application that lets you send trackable emails via Amazon Simple Email Service (SES).

Heroku

You can deploy Sendy on Heroku using the following instructions (I assume you've already installed the heroku toolbelt).

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Redirect Subfolder" stopProcessing="true">
<match url="^" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
@nicolasguzca
nicolasguzca / console.log.sublime-snippet
Created November 24, 2017 16:58
console log sublime snippet
<snippet>
<content><![CDATA[console.log(${1:}$SELECTION);${0}]]></content>
<tabTrigger>con</tabTrigger>
<scope>text.plain, source.js</scope>
</snippet>
package main
import (
"github.com/gin-gonic/gin"
"github.com/jinzhu/gorm"
_ "github.com/mattn/go-sqlite3"
)
type Users struct {
Id int `gorm:"AUTO_INCREMENT" form:"id" json:"id"`
@nicolasguzca
nicolasguzca / RDFacadeExtensions.cs
Created May 10, 2018 17:32
Using dbcontext raw query .NetCore
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Internal;
using Microsoft.EntityFrameworkCore.Storage;
using System.Threading;
using System.Threading.Tasks;
namespace yournamespace.Data
{
public static class RDFacadeExtensions
{