Skip to content

Instantly share code, notes, and snippets.


Paul Stamatiou stammy

View GitHub Profile
stammy / TipsView.swift
Created Jul 4, 2020
SwiftUI MicroAnimation example
View TipsView.swift
// TipsView.swift
// Stonks
// Created by Paul Stamatiou on 7/3/20.
import SwiftUI
import PlaygroundSupport
stammy / wordpress_importer.rb
Last active Dec 29, 2020
Import a WordPress database and generate markdown files for Jekyll
View wordpress_importer.rb
# View my Jekyll blog and my jekyll migration post
# based on the import script by icebreaker, which is based on mojombo's
# edited to rewrite image URLs to use my CloudFront URL
require 'rubygems'
require 'sequel'
stammy / jsonPlayground.swift
Created Apr 11, 2020
swift json codable with dynamic key
View jsonPlayground.swift
// this uses a dynamic coding key (StockKey) but does not work with nested objects (ideally quote should have many properties inside
import SwiftUI
import Combine
import Foundation
/* todo modify to work with json in format:
stammy / index.xml
Created Jan 25, 2011
RSS Feed for Jekyll (feed/index.xml) -
View index.xml
layout: nil
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="">
<title type="text" xml:lang="en">{{ site.root_desc }}</title>
<link type="application/atom+xml" href="" rel="self"/>
<link type="text" href="" rel="alternate"/>
<updated>{{ site.time | date_to_xmlschema }}</updated>
stammy / _media-queries.scss
Last active Dec 20, 2019 — forked from anthonyshort/_media-queries.scss
because you should be using ems for accessibility (zoom level) in your media queries
View _media-queries.scss
// $mq-mobile-portrait : 320px !default;
// $mq-mobile-landscape : 480px !default;
// $mq-tablet-portrait : 640px !default; -- changed because i want my blog content is around this wide, not 768. you should let content & design determine your breakpoints
// $mq-tablet-landscape : 1024px !default;
// $mq-desktop : 1382px !default;
$mq-mobile-portrait : 20em !default;
$mq-mobile-landscape : 30em !default;
$mq-tablet-portrait : 40em !default;
$mq-tablet-landscape : 64em !default;
stammy / firebase.html
Created Nov 28, 2012
Hello World Firebase
View firebase.html
+1 with firebase. now you just need to write a node app with regression logic
that listens to each new vote on each post and tracks value history to ignore and reset
any malicious db.set(0)'s people run in console when they find this completely
public script on your site. (Firebase is working on their security).
stammy / Rakefile
Created Jan 24, 2011
rake task for creating a new jekyll post.
View Rakefile
# ignore the "bit" stuff.. only relevant to my custom jekyll fork
desc 'create new post or bit. args: type (post, bit), title, future (# of days)'
# rake new type=(bit|post) future=0 title="New post title goes here" slug="slug-override-title"
task :new do
require 'rubygems'
require 'chronic'
type = ENV["type"] || "bit"
title = ENV["title"] || "New Title"
View gist:4521106
"color_scheme": "Packages/Color Scheme - Default/Blackboard.tmTheme",
"font_face": "monaco",
"font_size": 10.5
View nginx.conf
location /resize {
alias /tmp/nginx/resize;
set $width 150;
set $height 100;
set $dimens "";
if ($uri ~* "^/resize_(\d+)x(\d+)/(.*)" ) {
set $width $1;
set $height $2;
set $image_path $3;
stammy / gist:4166118
Created Nov 29, 2012
IAM S3 read-only
View gist:4166118
// AWS IAM S3 Read-only, single bucket policy
"Statement": [
"Effect": "Allow",
"Action": [