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
#!/usr/bin/env php | |
<?php | |
function help() { | |
echo PHP_EOL . 'Usage: csvsplitter <input file> <number of lines>' . PHP_EOL; | |
exit(); | |
} | |
if (!isset($argv[1])) { | |
echo PHP_EOL . "Please enter a csv filename"; |
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/sh | |
# Some image files were fetched from an URL and not validated. | |
# Hence we have files that have '.jpg' extensions but are actually HTML files. | |
# Clean these out | |
# Remove the `-i` from the `rm` if you don't want to manually confirm deletion | |
for f in `find ./ -type f -iname "*.jpg"`; | |
do | |
file "$f" | grep -q HTML | |
if [ $? -eq 0 ] ; then |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Vue 2 table example</title> | |
</head> | |
<body> | |
<div id="app"> | |
<table width="90%" border="1" cellpadding="2" cellspacing="2" v-show="sites.length > 0"> |
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
<?php | |
$collection = Mage::getModel('sales/order_item')->getCollection(); | |
$collection | |
->addAttributeToFilter('updated_at', array('gt' => $this->reportStartDate)) | |
->addAttributeToFilter('updated_at', array('lt' => $this->reportEndDate)); | |
// this is where we add the group by | |
$collection->getSelect()->group('main_table.sku'); |
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
// forEach over Arrays | |
var items = ['fish', 'birds', 'dogs', 'cats']; | |
items.forEach(function(item, index) { | |
console.log(index + ': ' + item); | |
}); | |
// forEach over Objects | |
var h2 = document.getElementsByTagName('h2'); | |
Object.keys(h2).forEach(function(item){ |
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
Verifying that +euperia is my blockchain ID. https://onename.com/euperia |
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
/** | |
* Use this to show which breakpoint the css is using | |
* when using Bootstrap responsive | |
*/ | |
body::before { | |
content: "xs"; | |
position: fixed; | |
top: 0; | |
left: 0; |
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
/** | |
* Phantomgrab - take a screenshot of a webpage | |
* | |
* Run with: | |
* phantomjs --ssl-protocol=any --ignore-ssl-errors=true phantomgrab.js | |
* | |
*/ | |
var page = require('webpage').create(); |