Skip to content

Instantly share code, notes, and snippets.

View panoply's full-sized avatar
🥛
Rich in the hood

ΝΙΚΟΛΑΣ panoply

🥛
Rich in the hood
View GitHub Profile
@panoply
panoply / .htacess-git-ingored
Created May 30, 2016 01:34
Ignore .git from .htaccess
<Files .git/*>
order allow,deny
deny from all
</Files>
@panoply
panoply / Preferences.sublime-settings.js
Last active June 28, 2016 21:54
Reference - Sublime preferences and modified dreamweaver theme.
{
"caret_style": "phase",
"color_scheme": "Packages/User/SublimeLinter/Monokai Soda (SL).tmTheme",
"detect_indentation": true,
"draw_white_space": "all",
"enable_tab_scrolling": true,
"fade_fold_buttons": false,
"find_selected_text": true,
"font_face": "Courier New",
"font_options": "subpixel_antialias",
@panoply
panoply / Preferences.sublime-settings.js
Created June 28, 2016 21:57
Sublime 3 settings as of 2016 and using dark code backdrop.
{
"binary_file_patterns":
[
"generated/*",
"*.tbz2",
"*.gzip",
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
@panoply
panoply / Readme.md
Created July 26, 2016 08:43
Silk Stock POST request (EXAMPLE) using Guzzle 6.0 >

Setup

Dependency Inversion principle design pattern (which is where you find SILK API connection). Here is an example of how I am talking to the SILK API. The GET request as of 2 days ago is now returning an empty page, this also tested using POSTMAN. POST requests using Guzzle continually fail, have never worked.

Build with Laravel 5.2 framework.

.ENV Values (Secret is valid):

@panoply
panoply / add-free-product.liquid
Created June 3, 2016 21:52
Shopify Scripts – Free product with purchase of Item. Also requires a Liquid integration.
//
{% assign found = false %}
{% for finder in product.collections %}
{% if finder.handle == 'name' %}
{% assign found = true %}
{% endif %}
{% endfor %}
{% if found == false %}
<ul>
@panoply
panoply / Seasons.js
Created October 11, 2016 16:34
GET current season
Date.fromJulian = function (j) {
j = (+j) + (30.0 / (24 * 60 * 60));
var A = Date.julianArray(j, true);
return new Date(Date.UTC.apply(Date, A));
};
Date.julianArray = function (j, n) {
var F = Math.floor;
var j2, JA, a, b, c, d, e, f, g, h, z;
j += 0.5;
j2 = (j - F(j)) * 86400.0;
@panoply
panoply / essentials.md
Last active December 7, 2016 15:28
Vanilla JS Essentials

Load (654 bytes)

Asynchronous asset loading. Load.js is my Require.js alternative. It’s this handy little script that handles asynchronous loading of assets and “per-page” specific javascript and css files.

Store (3.4 kb)

Work with Local storage. Store.js makes working with your browser’s local storage an utter ease and supports legacy browsers.

Cookie (3.59 kb) JS Cookie enables the storage of cookies.

@panoply
panoply / Drawers.html
Created September 21, 2016 16:48
Offcanvas Drawer (Standalone)
<div id="LeftDrawer" class="drawer drawer--left">
<div class="drawer__header">
<div class="drawer__title">Title</div>
</div>
<div class="drawer__navigation">
<ul>
<li><a href="#">Example Link</a></li>
<li><a href="#">Example Link</a></li>
<li><a href="#">Example Link</a></li>
<li><a href="#">Example Link</a></li>
@panoply
panoply / iso-current.json
Last active April 27, 2017 18:11
Relative Country ISO to Currency
/**
* Relative ISO to Currency JSON.
* This is custom list of countries that are relative to brixtol.com
*/
var geo = {
"locals": [
{
"country": "US",
@panoply
panoply / brxtl.js
Created August 2, 2017 19:27
geoIP
```
var GeoIP = (function () {
var fn = {};
var data = {};
var geo = [];
var rate;
fn.init = function(options) {