Skip to content

Instantly share code, notes, and snippets.

View macfisher's full-sized avatar

Mackenzie Fisher macfisher

View GitHub Profile
// 36 milliseconds runtime
public void swapCards() {
ArrayList<Integer> tracker = new ArrayList<Integer>();
int rand = this.randomInt(0, this.cards.length - 1);
for (int i = 0; i < this.cards.length; i++) {
if (i == 0)
tracker.add(rand);
while (tracker.contains(rand)) {
#!/bin/bash
MAGE='sudo php -d memory_limit=-1 -f /var/www/magento2/bin/magento'
chmod -R 775 pub/static/ var/ pub/media/ &&
rm -rf var/view_preprocessed/ var/cache/ var/page_cache/ var/tmp/ var/generation/ pub/static/frontend/;
$MAGE cache:clean &&
$MAGE cache:flush &&
$MAGE indexer:reindex &&
$MAGE setup:static-content:deploy; $MAGE setup:static-content:deploy -f;
@macfisher
macfisher / yubi_suma.js
Created February 17, 2018 16:53
Yubi suma!
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<script>
@macfisher
macfisher / index.html
Created May 11, 2017 16:20 — forked from liuyanghejerry/index.html
Modern index file in 2017
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">
<head>
<!-- content-type, which overrides http equivalent header. Because of charset, this meta should be set at first. -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- Overrides http equivalent header. This tells IE to use the most updated engine. -->
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<!-- Tells crawlers how to crawl this page, and the role of this page. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta -->
<meta name="robots" content="index, follow">