Skip to content

Instantly share code, notes, and snippets.

set guifont=Monaco:h16
set transparency=0
set guifont=Monaco:h16
set transparency=0

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@montalvomiguelo
montalvomiguelo / .vimrc
Last active August 29, 2015 14:20 — forked from JeffreyWay/.vimrc
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
@media (min-width: 980px) {
.pure-visible-phone {
display: none;
}
.pure-visible-tablet {
display: none;
}
.pure-hidden-desktop {
display: none;
}
@montalvomiguelo
montalvomiguelo / dbconversion.php
Created June 19, 2016 20:51 — forked from sanjaybhowmick/dbconversion.php
Convert MySQL collation from utf8mb4 to utf8
<?php
$dbname = 'your-database-name';
mysql_connect('your-database-hostname', 'your-database-username', 'your-database-password');
mysql_query("ALTER DATABASE `$dbname` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci");
$result = mysql_query("SHOW TABLES FROM `$dbname`");
while($row = mysql_fetch_row($result)) {
$query = "ALTER TABLE {$dbname}.`{$row[0]}` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci";
mysql_query($query);
$query = "ALTER TABLE {$dbname}.`{$row[0]}` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci";
mysql_query($query);
/*
* Shopify Common JS
*
*/
// set a given selector with value, if value is one of the options
Shopify.setSelectorByValue = function(selector, value) {
for (let i = 0, count = selector.options.length; i < count; i++) {
const option = selector.options[i];
if (value == option.value || value == option.innerHTML) {
var brand = document.getElementById('brand');
var intervals = [];
function scramble(element, text, time) {
var length = element.innerText.length;
var diff = (length - text.length) * -1;
var count = 0;
var lettersPerIteration = 0;
if (diff !== 0) {
# Insomnia Configuration
## Run the test query
{
shop {
id
name
}
}
# Query Structure Examples
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<!-- Partytown config -->
<script>
partytown = {
debug: true,