Skip to content

Instantly share code, notes, and snippets.

View digiltd's full-sized avatar

Sam Turner digiltd

View GitHub Profile
@digiltd
digiltd / transaction-email-variables
Created January 3, 2023 15:26 — forked from tiagones/transaction-email-variables
Magento - Transaction Email Variables
Para a inscrição:
1. {{var customer}} irá imprimir todas as informações do cliente
2. {{var customer.ID}}
3. {{var customer.email}}
4. {{var customer.firstname}}
5. {{var customer.lastname}}
6. {{var customer.name}}
7. {{var customer.password}}
8. {{var customer.created_in}}
@digiltd
digiltd / gist:b7934d8dbf4cbc929b55f7fd7bc0f947
Created January 4, 2018 10:23 — forked from al3xandru/gist:1128606
nvALT Bookmarklet Instapaper
javascript:(function({
var INSTAPAPER=true,w=window,d=document,pageSelectedTxt=w.getSelection?w.getSelection():(d.getSelection)?d.getSelection():(d.selection?d.selection.createRange().text:0),pageTitle=d.title,pageUri=w.location.href,tmplt="";
tmplt="From ["+pageTitle+"]("+pageUri+"):\n\n";
if(pageSelectedTxt!="") {
pageSelectedTxt=">%20"+pageSelectedTxt;
pageSelectedTxt=pageSelectedTxt.replace(/(\r\n|\n+|\r)/gm,"\n");
pageSelectedTxt=pageSelectedTxt.replace(/\n/g,"\n>%20\n>%20");
w.location.href="nvalt://make/?txt="+encodeURIComponent(tmplt+pageSelectedTxt)+"&title="+encodeURIComponent(pageTitle)
}
else {
@digiltd
digiltd / DragTransform
Created April 26, 2017 10:47 — forked from fta2012/DragTransform
Slightly modified compiled coffeescript from this codepen: http://codepen.io/fta/pen/ifnqH. Paste into console on a page that has jQuery to load the two dependent libraries (jquery-ui and numericjs). Then call makeTransformable('#selector-name') to make that element WYSIWYG editable. Use inspector to get the CSS for the transforms.
var selector = 'img' // Replace this with the selector for the element you want to make transformable
jQuery.getScript('//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js', function() {
jQuery.getScript('//cdnjs.cloudflare.com/ajax/libs/numeric/1.2.6/numeric.min.js', function() {
(function() {
var $, applyTransform, getTransform, makeTransformable;
$ = jQuery;
@digiltd
digiltd / IntentSchema.json
Created January 26, 2017 20:20
GeeMusic using Custom Slots
{
"intents": [
{
"intent": "AMAZON.PauseIntent"
},
{
"intent": "AMAZON.ResumeIntent"
},
{
"intent": "GeeMusicPlayArtistIntent",
@digiltd
digiltd / test-network-connection.applescript
Last active August 12, 2016 10:20
Ping Google up to five times to test internet connectivity
# Source : http://stackoverflow.com/questions/13224718/check-for-active-internet-connection-with-applescript-automator
repeat with i from 1 to 5
try
do shell script "ping -o -t 5 www.google.com"
exit repeat
on error
delay 20
if i = 5 then error number -128
end try
end repeat
@digiltd
digiltd / private.xml
Last active July 28, 2016 21:25
controlling your Hue lights using the keyboard backlight brightness buttons on a MacBook Pro
<!---
Inspired by Reddit user @lzm
https://www.reddit.com/r/Hue/comments/4uvvfe/controlling_your_lights_with_the_backlight_keys/
--->
<?xml version="1.0"?>
<root>
<vkopenurldef>
<name>KeyCode::VK_OPEN_URL_SHELL_LIGHT_OFF</name>
<url type="shell">
@digiltd
digiltd / _underline.scss
Created July 6, 2016 19:18 — forked from pixeline/_underline.scss
Smart Underline Sass Mixin
// dev note: make sure to use an autoprefixer...
@mixin underline($background: #fff, $text: #000, $selection: #ffc, $position: 86%){
color: inherit;
text-decoration: none;
background: linear-gradient($background, $background), linear-gradient($background, $background), linear-gradient($text, $text);
background-size: .05em 1px, .05em 1px, 1px 1px;
background-repeat: no-repeat, no-repeat, repeat-x;
text-shadow: 0.03em 0 $background, -0.03em 0 $background, 0 0.03em $background, 0 -0.03em $background, 0.06em 0 $background, -0.06em 0 $background, 0.09em 0 $background, -0.09em 0 $background, 0.12em 0 $background, -0.12em 0 $background, 0.15em 0 $background, -0.15em 0 $background;
background-position-y: $position,$position, $position;
http://www.alfredforum.com/topic/9070-how-to-workflowenvironment-variables/
https://gist.github.com/3b5a116aef9154f694ab775a40ea4423
$ /usr/libexec/PlistBuddy -c "Set :variables:server \"ABC-XYZ\"" info.plist