Skip to content

Instantly share code, notes, and snippets.

View theskillwithin's full-sized avatar
😝
yay

Austin Peterson theskillwithin

😝
yay
View GitHub Profile
@theskillwithin
theskillwithin / 0_reuse_code.js
Created February 1, 2017 18:44
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
{
"added_words":
[
"Mockup",
"plugins",
"coffeescript",
"sourcemaps",
"html",
"plugin",
"init",
@theskillwithin
theskillwithin / if.js
Created November 15, 2016 21:18 — forked from Siilwyn/if.js
Multiple ways to handle the platform: switch vs. if...else vs. object
var getConfigDirectory = function () {
var platform = process.platform;
if (platform === 'linux') {
return process.env.XDG_CONFIG_HOME || path.join(home(), '.config')
}
else if (platform === 'darwin') {
return path.join(home(), 'Library', 'Preferences');
}
else if (platform === 'win32') {
@theskillwithin
theskillwithin / css.scpt
Created September 30, 2016 22:11
textual://custom-scripts-folder
on textualcmd(inputText, selectedChannel)
if inputText is equal to "flexbox" then
return "https://css-tricks.com/snippets/css/a-guide-to-flexbox/ --- https://youtu.be/G7EIAgfkhmg --- https://youtu.be/qpdxiIDzg6Q"
else if inputText is equal to "cp" then
return "codepen.io"
else
return "/debug Help commands: message1, message2"
end if
end textualcmd
@theskillwithin
theskillwithin / package.json
Created September 22, 2016 21:05
npm-scripts
{
"name": "heartcup",
"version": "1.2.0",
"description": "hearcup.",
"keywords": [
"npm",
"scripts",
"npm scripts",
"watch",
"minify",
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
{
"name": "Heartcup",
"description": "Heartcup",
"main": "gulp.config.js",
"authors": [
"Brandastic"
],
"license": "",
"moduleType": [],
"homepage": "",
@theskillwithin
theskillwithin / README.md
Created April 17, 2016 00:12
comparing two CSV files and combining them.

CSV-File-Compare

Compares a csv file against a text file to quickly find the cost of a free gift report

cvsfilecompare.php will read a file called test.csv which is a report generaed from a Magento site.

This is used to determine the cost of "free gifts" which are coupon codes in Magento that give you a gift item at checkout.

<?php
include('aws_signed_request.php');
function init() { //get the amazon process output
$row = 1;
if (($handle = fopen("proccess.csv", "r")) !== FALSE) {
while (($data = fgetcsv($handle, 1000, "\t")) !== FALSE) {
$num = count($data);
//echo "<p> $num fields in line $row: <br /></p>\n";
$row++;