Skip to content

Instantly share code, notes, and snippets.

View alexeightsix's full-sized avatar
🎯
Focusing

a86 alexeightsix

🎯
Focusing
View GitHub Profile
(index):1 Uncaught (in promise) DOMException: Blocked a frame with origin "http://xxx.local:8081" from accessing a cross-origin frame.
at JSON.stringify (<anonymous>)
at en (https://js.stripe.com/v3/:1:24070)
at t.value (https://js.stripe.com/v3/:1:28382)
at t.value (https://js.stripe.com/v3/:1:27601)
at https://js.stripe.com/v3/:1:41124
at new Promise (<anonymous>)
at e._sendCAReq (https://js.stripe.com/v3/:1:41048)
at Object.tokenizeWithElement (https://js.stripe.com/v3/:1:41787)
at https://js.stripe.com/v3/:1:112787
** public function timeDiff($timestamp = 0, $timezoneoffset = 0) {
# public function timeDiff($timestamp = 0, $timezoneoffset = 0) {
#
# PHP : Le timezone offset est différent de celui de javascript
# 1) Le offset retourné en PHP est en secondes, celui de JS est
# en minutes.
# 2) Le offset négatif en PHP est positif en JavaScript et
# vice-versa
#
if (!is_numeric($timestamp)) { $timestamp = strtotime($timestamp); }
function showItemAll( itemTarget ){
if( n_ids != '' && d_ids != '' && t_ids != '' && dis_ids != '' ){
for( var i=0; i<=n_ids.length; i++ ){
if( itemTarget.hasClass( n_ids[i]) ){
for( var j=0; j<d_ids.length; j++ ){
if( itemTarget.hasClass( d_ids[j]) ){
for( var t=0; t<t_ids.length; t++ ){
if( itemTarget.hasClass( t_ids[t]) ){
for( var dis=0; dis<dis_ids.length; dis++ ){
@alexeightsix
alexeightsix / gist:2fa78a6e5ff54636e287
Created March 19, 2016 22:58
add2any font awesome
/* https://en-ca.wordpress.org/plugins/add-to-any/ */
/* replaces icons with Font=awesome icons */
$(window).load(function() {
var share = $('.addtoany_share_save_container');
if (share.length === 1) {
var buttons = $('.addtoany_share_save_container').find("a");
@alexeightsix
alexeightsix / 0_reuse_code.js
Created November 9, 2015 02:51
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<script type="text/javascript">
function generateFaceValues() {
var gameLevel = '{{ product.metafields.level.GameLevel }}';
switch (gameLevel) {
case 'Bronze':
var key = 0;
break;
case 'Silver':
<script type="text/javascript">
function generateFaceValues() {
var rows = $('.ticketDetail-table li');
$.each(rows, function (index, value) {
var row = new Object();
row.status = $(this).data('status');
row.row = $(this).data('row');
row.section = $(this).data('section');