Skip to content

Instantly share code, notes, and snippets.

View ekalvi's full-sized avatar

Erik Kalviainen ekalvi

View GitHub Profile
@ekalvi
ekalvi / mac-setup-readme.md
Last active November 17, 2022 09:20
Setup Meya Mac

Prerequisites

  1. Make sure you have your 1password recovery page
  2. Remember to visit https://gist.github.com/ekalvi to get this gist as the first step of setting up the Mac
    • from terminal: nano setup.sh > paste the contents of setup-meya-mac.sh
    • chmod +x setup.sh
    • ./setup.sh
  3. Make sure you're signed into the App Store

Manual steps while/after running the setup-meya-mac.sh

@ekalvi
ekalvi / height.yaml
Created September 14, 2016 21:45
Messenger v1.2 examples
name: height
states:
compact:
component: meya.text_buttons
properties:
text: Testing different webview heights...
mode: quick_reply
buttons:
- text: Compact
url: https://meya.ai
@ekalvi
ekalvi / temp1.py
Created April 8, 2016 21:41
Slack channel invites
from locl.models.user import LoclUser
min_id = 2533
max_id = 3000
tranche = 1
limit = 20
start = tranche * limit
end = start + limit
@ekalvi
ekalvi / init_codedeploy.sh
Last active August 29, 2015 14:16
Add AWS CodeDeploy Agent to Ubuntu Instance
#!/bin/sh
KEY=$1
SECRET=$2
REGION=$3
if [ -z $KEY ]; then
echo "Error: Usage is init_codedeploy.sh <KEY> <SECRET> <REGION>"
exit 1
fi
if [ -z $SECRET ]; then
echo "Error: Usage is init_codedeploy.sh <KEY> <SECRET> <REGION>"
@ekalvi
ekalvi / designer.html
Last active August 29, 2015 14:11
designer
<link rel="import" href="../polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@ekalvi
ekalvi / designer.html
Created December 8, 2014 19:43
designer
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../paper-calculator/paper-calculator.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../paper-item/paper-item.html">
<link rel="import" href="../topeka-elements/category-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<polymer-element name="my-element">
<template>
@ekalvi
ekalvi / slugify
Last active August 29, 2015 14:06
from tastypie.utils.timezone import now
from django.contrib.auth.models import User
from django.db import models
from django.utils.text import slugify
class Entry(models.Model):
user = models.ForeignKey(User)
pub_date = models.DateTimeField(default=now)
title = models.CharField(max_length=200)
@ekalvi
ekalvi / designer.html
Last active August 29, 2015 14:06
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../paper-icon-button/paper-icon-button.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<link rel="import" href="../paper-item/paper-item.html">
@ekalvi
ekalvi / designer.html
Created September 5, 2014 03:38
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;