Skip to content

Instantly share code, notes, and snippets.

@mritzco
mritzco / .lesshintrc
Last active February 24, 2017 08:33
Using NPM as a build tood
{
"fileExtensions": [".less", ".css"],
"excludedFiles": ["src/less/*.less"],
"spaceAfterPropertyColon": {
"enabled": true,
"style": "one_space" // Comments are allowed
},
"maxCharPerLine": 999999,
"spaceAfterPropertyColon": "no_space",
"urlQuotes": false,
@mritzco
mritzco / floreant_reports.sql
Last active February 3, 2017 09:17
FloreantPOS order reports
/* makes a small report of all tickets with details on orders */
SELECT DISTINCT
TICKET.ID,
CREATE_DATE,
TICKET.TOTAL_PRICE,
TICKET.PAID_AMOUNT,
CAST( VOIDED AS UNSIGNED) AS VOIDED,
PAYMENT_TYPE, (SELECT GROUP_CONCAT( CATEGORY_NAME, ".", ITEM_NAME,": ", ITEM_PRICE SEPARATOR ', ')
FROM TICKET_ITEM
WHERE TICKET_ITEM.TICKET_ID = TICKET.ID
@mritzco
mritzco / instructions.md
Last active June 21, 2016 13:51
Ubuntu phablet (BQ M10)

###Making the tablet useful

####Enabling apt-get and installing normal apps Follow this guide

uname -a
lsb_release -a
lscpu
cat /proc/cpuinfo
mkdir .ssh
@mritzco
mritzco / snippets.conf
Created April 26, 2016 06:16
Geany snippets
# Geany's snippets configuration file
#
# use \n or %newline% for a new line (it will be replaced by the used EOL char(s) - LF, CR/LF, CR).
# use \t or %ws% for an indentation step, it will be replaced according to the current document's indent mode.
# use \s to force whitespace at beginning or end of a value ('key= value' won't work, use 'key=\svalue').
# use %key% for all keys defined in the [Special] section.
# use %cursor% to define where the cursor should be placed after completion. You can define multiple
# %cursor% wildcards and use the "Move cursor in snippet" to jump to the next defined cursor
# position in the completed snippet.
# You can define a section for each supported filetype to overwrite default settings, the section
@mritzco
mritzco / snippets.cson
Last active January 18, 2018 08:59
Snippets for atom
# Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing 'snip' and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#
<!DOCTYPE html>
<html ng-app="app">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
ul {
padding: 10px;
@mritzco
mritzco / config.json
Last active August 29, 2015 14:27 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@mritzco
mritzco / JAVA_HOME
Created July 7, 2015 06:58
Setting JAVA_HOME correctly
#Setting up JAVA_HOME correctly
###Intro:
Spark and maven are not happy with JAVA_HOME set to usr/bin/java, so we need to setup to the real path.
In terminal (each line uses the result of the previous one as last parameter, replace as required):
```
which java
ls -alh /usr/bin/java
ls -alh /etc/alternatives/java
```
@mritzco
mritzco / unique_sorted_set.lua
Last active August 29, 2015 14:10
Implements a REDIS Sorted Set, sorted by order of insertion. Return index (base 1) or 0 if element already exists
local res = redis.call("zrange", KEYS[1], -1, -1, 'WITHSCORES')
local last_id
if res then
last_id = 1
else
last_id = res[2] + 1
end
local add_res = redis.call("ZADD", KEYS[1], last_id, ARGV[1])
if add_res == 0 then
last_id = 0
<!DOCTYPE html>
<html ng-app="app">
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.0.1/angular.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body ng-controller="MyCtrl">
{{serviceOutput}} -
{{name}}-