This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* jQuery confirm modal using bootstrap 3.0 (might work with other, shrug) | |
* | |
* Usage: | |
* var otherFunction = function(){ | |
* funkyDialogBox( | |
* "Will you marry me", | |
* function(){ console.log('She said YES! :D'}, | |
* function(){ console.log('She said no :(') | |
* } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
type: 'POST', | |
data: { | |
'datalabel1': data_1, | |
'datalabel2': data_2 | |
}, | |
url: '/where/to/post', | |
success: function(data) { | |
console.log("SUCCESS:") | |
console.log(data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// JSON to Uint8Array parsing and visa versa | |
// (Intended Bluetooth communication on Cordova) | |
var JsonToArray = function(json) | |
{ | |
var str = JSON.stringify(json, null, 0); | |
var ret = new Uint8Array(str.length); | |
for (var i = 0; i < str.length; i++) { | |
ret[i] = str.charCodeAt(i); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim arguments | |
Set arguments = WScript.Arguments | |
' http://msdn2.microsoft.com/en-us/library/bb238158.aspx | |
Const wdFormatXMLDocument = 12 ' docx | |
' https://technet.microsoft.com/en-us/library/ff198017.aspx | |
Const xlOpenXMLWorkbook = 51 ' xlsx | |
' https://msdn.microsoft.com/en-us/library/office/ff746500.aspx | |
Const ppSaveAsOpenXMLPresentation = 24 ' pptx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Requires python, pip, virtualenv | |
# which can be installed with brew install python | |
# (See brew.sh for brew installation) | |
bold=$(tput bold) | |
normal=$(tput sgr0) | |
function trueFalseInput { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// nodejs freshdesk implementation | |
var request = require('request'); | |
var url = "http://yourcompanyname.freshdesk.com"; // Your URL | |
var apikey = ""; // Your API key | |
var auth = 'Basic ' + new Buffer(apikey + ':X').toString('base64'); | |
var fresh = { | |
get: function(link, callback) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"DistributionConfig": { | |
"Comment": "", | |
"CacheBehaviors": { | |
"Quantity": 0 | |
}, | |
"Logging": { | |
"Bucket": "", | |
"Prefix": "", | |
"Enabled": false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
1) Sign up for pushbullet @ pusbullet.com | |
2) Install the pushbullet app on your phone | |
3) Find your API key here: https://www.pushbullet.com/#settings/account | |
4) Install pushbullet with 'pip install pushbullet.py' | |
5) Replace 'key' value below | |
''' | |
from pushbullet import Pushbullet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form method="POST" action="http://localhost:2222/rest/download/png" onSubmit="getSvg(this)"> | |
<input type="hidden" value="" name="data" type="text" /> | |
<button type="submit">GO</button> | |
</form> | |
<div class="svg-wrapper"> | |
<svg height="140" width="500"> | |
<ellipse cx="200" cy="80" rx="100" ry="50" style="fill:yellow;stroke:purple;stroke-width:2" /> | |
</svg> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form method="POST" action="http://localhost:2222/rest/download/png" onSubmit="getSvg(this)"> | |
<input type="hidden" value="" name="data" type="text" /> | |
<button type="submit">GO</button> | |
</form> | |
<div class="svg-wrapper"> | |
<svg height="140" width="500"> | |
<ellipse cx="200" cy="80" rx="100" ry="50" style="fill:yellow;stroke:purple;stroke-width:2" /> | |
</svg> | |
</div> |
OlderNewer