This file contains hidden or 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
function onOpen(e) { | |
eval(UrlFetchApp.fetch('https://cdnjs.cloudflare.com/ajax/libs/jsSHA/2.3.1/sha256.js').getContentText()); | |
var key = ''; | |
var secret = ''; | |
var customer_id = ''; | |
var nonce = new Date().getTime().toString(); | |
var message = nonce + customer_id + key | |
var shaObj = new jsSHA("SHA-256", "BYTES"); | |
shaObj.setHMACKey(secret, "BYTES"); | |
shaObj.update(message); |
This file contains hidden or 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/sh | |
# Prepend Branch name to commit messages | |
# Succeed on all merge messages, as evidenced by MERGE_MSG existing | |
[ -f $GIT_DIR/MERGE_MSG ] && exit 0 | |
# Get branch name and description | |
NAME=$(git branch | grep '*' | sed 's/* //') | |
DESCRIPTION=$(git config branch."$NAME".description) |
This file contains hidden or 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
{"lastUpload":"2020-02-06T11:04:40.775Z","extensionVersion":"v3.4.3"} |
This file contains hidden or 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 | |
NO_DEV="--no-dev" | |
if [[ $1 == "dev" ]]; then | |
NO_DEV="" | |
fi | |
git fetch |
This file contains hidden or 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
function getTweetTime(timestamp) | |
{ | |
var time = (Date.parse(timestamp)/1000); | |
time = Math.round((((new Date()).getTime() / 1000)-time)/60); | |
if (time >= 60) { | |
var hours = Math.round(time / 60); | |
if (hours == 1) { | |
return "sent " + hours + " hour ago"; |
This file contains hidden or 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
function get_html_translation_table (table, quote_style) { | |
var entities = {}, | |
hash_map = {}, | |
decimal; | |
var constMappingTable = {}, | |
constMappingQuoteStyle = {}; | |
var useTable = {}, | |
useQuoteStyle = {}; | |
// Translate arguments |
This file contains hidden or 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
function replaceURLWithHTMLLinks(text) { | |
var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; | |
return text.replace(exp,"<a href='$1'>$1</a>"); | |
} |
This file contains hidden or 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
<?php | |
/** | |
* @package {{PACKAGE}} | |
* @subpackage {{SUBPACKAGE}} | |
* @copyright Copyright (C) 2013 {{COPYRIGHT}}. All rights reserved. | |
* @license GNU General Public License version 2 or later when included with or used in the Joomla CMS. | |
*/ | |
// No direct access. | |
defined('_JEXEC') or die; |
This file contains hidden or 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
<?php | |
function getTime() | |
{ | |
$a = explode (' ',microtime()); | |
return(double) $a[0] + $a[1]; | |
} | |
$Start = getTime(); | |
$End = getTime(); |
This file contains hidden or 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
<?php | |
function getStringpart($string,$startStr,$endStr) | |
{ | |
$startpos=strpos($string,$startStr); | |
$endpos=strpos($string,$endStr,$startpos); | |
$endpos=$endpos-$startpos; | |
$string=substr($string,$startpos,$endpos); | |
return $string; |
NewerOlder