Skip to content

Instantly share code, notes, and snippets.

View petros's full-sized avatar
👾
Making games

Petros Amoiridis petros

👾
Making games
View GitHub Profile
@akoutmos
akoutmos / json
Created January 30, 2022 04:15
Pretty print JSON passed via STDIN using Elixir shell script
#! /usr/bin/env elixir
# Install required deps
Mix.install([:jason])
# The pretty printing module
defmodule JsonPrettyPrinter do
def get_stdin_data do
# Fetch data from STDIN and decode JSON
:stdio
@joshnuss
joshnuss / streaming_http_requests.ex
Last active March 31, 2023 09:02
Streaming HTTP requests
defmodule MyApp.Integrations.Skubana do
@host "..."
@headers [ ... ]
# returns a stream of shipments
def get_shipments do
# start with page 1
start = fn -> 1 end
# create a stream, it will make HTTP requests until the page returned is empty

kaths-bookshelf

There's a lot of recommended reading for product managers out there. Some of it is incredibly useful, and some of it is a waste of time. Business books don't really get me excited, but there are a few books, articles, newsletters, and podcasts authored by folks I look up to in the industry that I find myself coming back to often. When you're reading about product management, it's important to take everything with a grain of salt. The industry changes rapidly, and so does the discipline. If you learn something you want to try out from one of these books, go for it! But be careful not to whiplash yourself or your team.

I find new books and articles all the time, so I'm going to start dropping them here. Hope they help and inspire some other Product folks!

Books

Delivering Happiness by Tony Hsieh

Learning about how others have launched successful products and companies is definite

@whazzmaster
whazzmaster / keybindings.json
Last active November 21, 2022 09:06
Test tasks for Visual Studio Code and Elixir
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "cmd+t cmd+t",
"command": "workbench.action.tasks.runTask",
"args": "Run All Tests"
},
{
"key": "f5",
"command": "workbench.action.tasks.runTask",
class ApplicationController < ActionController::Base
include SessionAuthentication
# ...
end
@atmos
atmos / heaven.md
Last active November 23, 2020 22:35
Response to a dude who asked about heaven. https://github.com/holman/feedback/issues/422

@holman got a request about our deployment system, heaven

I know it's not a high priority, but has there been any activity on open-sourcing the core Heaven gem?

There is. I've been working on extracting the non-GitHub specific parts into two gems. This first is a CLI portion called hades. The second is an HTTP API portion called heaven.

When you open source something previously used as in internal tool like Heaven, Hubot, Boxen, etc., how do you manage and hook in the parts that need to stay internal?

Normally I focus around four questions:

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 19, 2024 11:00
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

class PostsController < ActionController::Base
def create
Post.create(post_params)
end
def update
Post.find(params[:id]).update_attributes!(post_params)
end
private
@tmm1
tmm1 / README.md
Created February 10, 2011 05:33
no longer requires any proxies! just replace your enhancers.js. also see https://gist.github.com/821736
@takeo
takeo / campfire_emoji.js
Created January 26, 2011 21:19
all the keys for campfire emoji
Emoji: {
'sunny': '2600',
'zap': '26a1',
'leaves': '1f343',
'lipstick': '1f483',
'cop': '1f46c',
'wheelchair': '267f',
'fish': '1f413',
'hammer': '1f52c',
'moneybag': '1f4b0',