Skip to content

Instantly share code, notes, and snippets.

View electricjesus's full-sized avatar
🐅

Seth Malaki electricjesus

🐅
View GitHub Profile
@electricjesus
electricjesus / $README.md
Last active November 9, 2023 11:27
Calico Application Layer Policy via Istio Helm Install

Calico Application Layer Policy via Helm

  1. follow install steps here, EXCEPT the Install Istio part.

  2. install istio-base via helm

    • kubectl create ns istio-system
    • helm install istio-base istio/base -n istio-system --wait

    and then choose one of the below options (marked with OPTION)

@electricjesus
electricjesus / Using Nodemon with Meteor.md
Last active December 30, 2015 00:09
Using Nodemon with Meteor for Rails-Guard-Style testing workflow

Using nodemon with meteor

Introduction

Earlier today, I was trying to find a quick rails-guard-esque workflow for Meteor with the Laika testing framework. Looking back at Rails' own solution, guard, I thought I would need a way to do the following:

  • Look for file changes in a tree / list of files & file trees
  • Define ignores for efficiency
@electricjesus
electricjesus / magecleanup.sql
Created November 1, 2013 15:42
mage cleanup - The two queries you need when you need to clean out categories and products. I haven't tested this with active orders, yet. I usually use this before re-importing via Magmi. I use this for my own DEVELOPMENT purposes. SHORT RAW: http://git.io/4KbqhA
## PLEASE use this for DEVELOPMENT only. Don't blame me if you're a dumbass.
DELETE FROM `catalog_product_entity`;
DELETE FROM `catalog_category_entity` WHERE `entity_id` NOT IN (1,2);
@electricjesus
electricjesus / any number
Last active December 22, 2015 21:19
takes a start year and end year, returns an array of years that have four different numbers. http://imgur.com/gallery/rDJjm
(function(start, max) {
results = [];
for(i = start;i <= max; i++) {
var year = String(i);
var f = "0123456789"
.split("")
.filter(function(n) {
return year.indexOf(n) != -1
});
@electricjesus
electricjesus / input.txt
Created March 28, 2013 06:48
my solution to HackerCup Beauiful strings
20
jWDjwOfloryIR(QW(I .Sowv h(iVMrWgpACa(vC.!dadFYlZ)LmOHnXQRzLFZbco;Fyn.swYxiN:wEidtrEAThwfrwpZWNVyMEBSKEthBUxcfxzzjPPShgidtRWfI:nlFMadPEzAdrFchivgrVrbaykkpr
IMNnye:LzeZKXlg!wGBx)Vp(tavJtLvnquSUeRQcG;bzTnJ; B(I)uepJwyqGwOSCPwgpCbw.LyXouVDKjYU HJO.Lkdc;VZBMaBca.Citq!kVlUfZk
mUh lsSDQuJwIZyH;gIBGYwEgknKbtuEspfR)qlOFuzh:uaAj(qLFmrdwShGjXE:(!hwFlUmWJm.eO;NMtFMBvIL!KhOP.VZkkEzPpXaRWHK(:s.UTjcXLA;Oc :uvD.VbSBZWv!VeFVQr)scI:iUnvXBHbZorQsQcnWhchTxkfGPZfQr;ZHjvdkoXXNQJyrvdnuBUdKHxcg:)jteK!WUkmgrmBCFwGp HiR HAkJNz!W.uwmu)I.BRlTojqu;KZwfJWtU!Oq.drauj cWIDHwvDzg:oG:(wafSbO(ZK(RiaQ.CVe(rQqhqC
SltSxIxJKmZoO.QM)JrEfP;)eieonGJicUJSFjWpEptJUD:cgf(uvJu!uvLsmizW!Xdz:SpXqHJyfQ()uib.wfRE;b!GGcYTAZDyJ(w(ZBhoFHyyBdaqC(HIdVUp!yY)L)MzzFe)oGsuLD!GzSmvtqWWyMAXh;fZVHVKEaRIB M: zDwNE)Ls!TTmbWWacgzHOwKB(LtLsTsJFpzjB)EumVerkChSjMpDWpO(NUXRjsoJGizdzXdQdYJCFeAZLLPpNQmVHsAKmN):gN
dcZWNczbPWCQswmO.veDGQ.ENwmkAAYMFNOB.LXsMeCDrK.YRk(wluBTTlkk:eaLTE(u;qaZWNwGXds(J!OrYhCskAPetfckT qbkTclxiO!ArM!BJImdOHjcCraYYBUMROmvkAGyuPSgmuARGkXsNzroKIl:i)YgzWE

This is an example of how to write bdd style tests for brunch.io projects and the required setup

# for later on when we want to use www schema
#server {
# listen 80;
# server_name DOMAIN.com;
# rewrite / $scheme://www.$host$request_uri permanent; ## Forcibly prepend a www
#}
server {
listen 80;
@electricjesus
electricjesus / CMS
Created November 27, 2012 18:12
General purpose Magento block/phtml inclusion call in CMS entries (pages/static blocks)
{{block type="core/template" name="my_product_list" template="custom/product_list.phtml"}}
@electricjesus
electricjesus / elasticsearch.rake
Created October 31, 2012 04:58 — forked from jarosan/elasticsearch.rake
Elasticsearch reindex task
# Run with: rake environment elasticsearch:reindex
# must have : tire, will_paginate
# added multiple classes to reindex
namespace :elasticsearch do
desc "re-index elasticsearch"
task :reindex => :environment do
[Place, Time] # <--- CONFIGURE HERE: Provided that you have classes called 'Place and Time which have the necessary Tire callbacks
@electricjesus
electricjesus / doubledecode-htmlent.py
Created March 13, 2012 17:13 — forked from litchfield/doubledecode.py
Double decode utf8 and cp1252
#!/usr/bin/env python
"""
modded doubledecode.py
Seth Malaki (seth d-o-t malaki a-t gmail d-o-t com)
mainly this modification aims to replace special characters with html entities instead.
Test status: todo/untested.