Skip to content

Instantly share code, notes, and snippets.

View helpse's full-sized avatar

Sergio Melendez helpse

View GitHub Profile
@helpse
helpse / webpack.config.js
Created April 1, 2017 03:32
Webpack + dev server + hot reloading + pug + sass
var webpack = require('webpack');
var path = require('path');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var src = path.join(__dirname, 'src');
var config = {
devServer: {
hot: true,
@helpse
helpse / index.html
Created March 16, 2018 19:12
Next.JS + Django
{% load static %}
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
/**
* queryString handler
* by Sergio Melendez
*
* Usage:
* url = location.pathname + getQuery().set('foo', 'bar').remove('baz');
*/
function getQuery() {
var data = {};
class Finances
@@sum = 0
def self.get_orders
Order.where(state: [1, 2, 3, 4])
end
def self.get_bids
BidRequest.where(state: [1, 2, 3, 5])
@helpse
helpse / prueba.php
Last active December 31, 2015 06:09
<?php
$server = $_SERVER['SERVER_NAME'];
$host = 'http://200.48.11.178';
$clientCarroceria = new SoapClient($host."/webservices/carroceria.php?wsdl");
var_dump($clientCarroceria);
//die();

Favourite Kohana Tips

Passing a route as array

    $this->redirect($this->request->route()->uri(array(
				'controller' => 'welcome',
				'action' => 'home',
			)));
@helpse
helpse / Odbc.php
Last active December 28, 2015 19:49 — forked from ceeram/Odbc.php
ODBC for DBO Modified by Sergio Melendez It works for a Linux / Apache / PHP / PDO_ODBC / ODBC / MSSQL environment The PDO driver provided by Microsoft for Linux, doesn't implement some PDO methods, you have to modify Model.php and DboSource.php as well (You can ask me for details)
<?php
/**
* ODBC for DBO
* Modified by Sergio Melendez
*
* It works for a Linux / Apache / PHP / PDO_ODBC / ODBC / MSSQL environment
* The PDO driver provided by Microsoft for Linux, doesn't implement some PDO methods,
* you have to modify Model.php and DboSource.php as well (You can ask me for details)
*
* PHP versions 4 and 5