Skip to content

Instantly share code, notes, and snippets.

View tonyerskine's full-sized avatar

Tony Erskine tonyerskine

View GitHub Profile
@tonyerskine
tonyerskine / User Input View.xml
Last active January 29, 2017 05:22
Odoo Survey User Input Line Combined Answer Field
<?xml version="1.0"?>
<form string="Survey User inputs" create="false">
<header>
<button name="action_survey_resend" string="Send Invitation Again" type="object" class="oe_highlight" attrs="{'invisible': ['|', ('type','=','manually'), ('state', '=', 'done')]}"/>
<button name="action_view_answers" states="done" string="Print These Answers" type="object" class="oe_highlight"/>
<button name="action_survey_results" string="View Results" type="object"/>
<field name="state" widget="statusbar"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box"/>
@tonyerskine
tonyerskine / RestfulLinkGeneratorTrait.groovy
Last active December 15, 2016 23:15
Grails Restful Link Generator
import grails.web.mapping.LinkGenerator
/**
* Copyright (c) 2016 SharpTop Software, LLC
*/
trait RestfulLinkGeneratorTrait {
LinkGenerator grailsLinkGenerator
String generateLink(Map map) {
@milocosmopolitan
milocosmopolitan / ngrok-installation.md
Last active June 21, 2023 16:31
Install ngrok on Mac OS X El Captin(10.11)

#Installing ngrok on OSX

When you try to install with downloaded zip file from ngrok website, alert message will pop up and tell you "ngrok" can't be opened because it is from an unidentified developer.

You can simply use homebrew to install this without any issue.

  1. Open your terminal
  2. $ brew cask install ngrok
@bbg
bbg / example.html
Last active January 21, 2020 22:32
jQuery upload image take the base64 code
<!DOCTYPE html>
<html>
<head>
<metea charset="utf8">
<title></title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-alpha1/jquery.js"></script>
<script type="text/javascript">
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
@hieblmedia
hieblmedia / .gitignore
Last active September 11, 2024 13:03
Gitignore - Exclude all except specific subdirectory
#
# If all files excluded and you will include only specific sub-directories
# the parent path must matched before.
#
/**
!/.gitignore
###############################
# Un-ignore the affected subdirectory