Skip to content

Instantly share code, notes, and snippets.

View mbejda's full-sized avatar
🎯
Focusing

Milos Bejda mbejda

🎯
Focusing
View GitHub Profile
@chrisjhoughton
chrisjhoughton / fb-open-graph.liquid
Last active February 10, 2025 17:27
Facebook Open Graph meta tags for Shopify. Add this as a snippet called "fb-open-graph.liquid" in your theme, and then add {% include 'fb-open-graph' %} to your theme.liquid file.
{% if template contains 'product' %}
<meta property="og:type" content="product">
<meta property="og:title" content="{{ product.title | strip_html | escape }}">
<meta property="og:category" content="{{ product.type }}" />
{% for image in product.images limit:3 %}
<meta property="og:image" content="http:{{ image.src | product_img_url: 'master' }}">
<meta property="og:image:secure_url" content="https:{{ image.src | product_img_url: 'master' }}">
{% endfor %}
<meta property="og:price:amount" content="{{ product.price | money_without_currency | stip_html | escape | remove: ',' }}">
<meta property="og:price:currency" content="{{ shop.currency }}">
@alanjames1987
alanjames1987 / session.js
Last active August 29, 2015 14:12
Express / Socket.IO Session Sync
var cookie = require('cookie');
var cookieParser = require('cookie-parser');
var _sessionStore;
var _sessionSecret;
function plugin(data) {
// store the Express session cookie name, session store, and session secret for use later
_sessionCookie = data.name || 'connect.sid';
@eupharis
eupharis / states_by_fips.json
Last active January 19, 2022 19:36
State FIPS JSON (Abbreviation and Name)
{
"01": {
"abbreviation": "AL",
"name": "Alabama"
},
"02": {
"abbreviation": "AK",
"name": "Alaska"
},
"03": {
@katowulf
katowulf / app.js
Last active September 15, 2017 01:22
Simple infinite scroll example in AngularFire with Firebase.util (http://firebase.github.io/firebase-util/)
var app = angular.module('app', ['firebase']);
app.controller('ctrl', function($scope) {
var ref = new Firebase('https://fbutil.firebaseio.com/paginate');
$scope.scrollItems = $scrollArray(ref, 'number');
});
app.factory('$scrollArray', function($firebaseArray) {
return function(ref, field) {
// create a special scroll ref
@ikegami-yukino
ikegami-yukino / fb_categories.json
Created August 4, 2015 07:43
Facebook page category list
{
"Airline": "Airline Industry Services",
"American Restaurant": "New American Restaurant",
"Amusement Park Ride": "Roller Coaster",
"Amusement": "Arcade",
"Amusement": "Bingo Hall",
"Amusement": "Go Karting",
"Amusement": "Laser Tag",
"Antiques & Vintage": "Antique Store",
"Antiques & Vintage": "Auction House",
#!/bin/bash
set -o errexit
clear
# Set versions. Check http://openresty.org for latest version and bundled version of nginx.
OPENRESTY_VERSION=1.9.3.1
NGINX_VERSION=1.9.3
OPENSSL_VERSION=1.0.2d
LUANGINX_VERSION=0.9.16
@kixorz
kixorz / aws_lambda_public_ip.js
Last active February 14, 2024 07:39
Function retrieving AWS Lambda public IP address. Copy and paste this to your Lambda console, use standard permissions, execute and observe the log to see the public IP address of your Lambda function.
var http = require('http');
exports.handler = function(event, context) {
http.get('http://httpbin.org/get', function(res) {
var body = '';
res.on('data', function(chunk) {
body += chunk;
});
res.on('end', function() {
@squarism
squarism / iterm2.md
Last active April 1, 2026 09:06
An iTerm2 Cheatsheet

In the below keyboard shortcuts, I use the capital letters for reading clarity but this does not imply shift, if shift is needed, I will say shift. So + D does not mean hold shift. + Shift + D does of course.

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
@mbejda
mbejda / Industries.csv
Last active December 18, 2025 13:33
Compiled list of industries.
Industry
Accounting
Airlines/Aviation
Alternative Dispute Resolution
Alternative Medicine
Animation
Apparel/Fashion
Architecture/Planning
Arts/Crafts
Automotive
@mbejda
mbejda / Band or Organization
Created October 18, 2015 16:44
Organization or Band Trained Dataset
BAND We are Paramore.
BAND Real bands save fans real fans save bands. If I don't follow you back i'd be glad to, just ask :) ♡personal account : @AllTimeFool♡
BAND New concert film & live album, Ghost Stories Live 2014, out now. CD/DVD/Blu-ray http://smarturl.it/Live2014  iTunes http://smarturl.it/Live2014iTunes 
BAND we're all fan girls at heart, this is the place to be for the most relatable tweets commonbandbusiness@gmail.com
BAND The Official Twitter of THE BAND PERRY. New single LIVE FOREVER on iTunes: http://smarturl.it/TBPLiveForever 
BAND bands according to tumblr // tw: @jordancatalano
BAND Band Of Horses 'Acoustic At The Ryman' Out Now: http://smarturl.it/bohaatrit 
BAND The Official Twitter profile for Incubus.
BAND Our Twitter run by the band and crew to give you an inside look into our lives on the road. Get #FutureHearts now: http://smarturl.it/futurehearts 
BAND Official Twitter feed for all things Rock Band®. Start a Band. Rock the World.