Skip to content

Instantly share code, notes, and snippets.

View poteto's full-sized avatar
🥔
ポテト

lauren poteto

🥔
ポテト
View GitHub Profile
@poteto
poteto / terra3.ex
Last active February 8, 2024 14:22
defmodule MyApp.Terraformers.LegacyApi do
alias MyApp.Clients.LegacyApi
use Plug.Router
plug :match
plug :dispatch
get _ do
%{method: "GET", request_path: request_path, params: params, req_headers: req_headers} = conn
res = LegacyApi.get!(request_path, req_headers, [params: Map.to_list(params)])
# Example taken from https://github.com/edgurgel/httpoison
defmodule GitHub do
use HTTPoison.Base
@expected_fields ~w(
login id avatar_url gravatar_id url html_url followers_url
following_url gists_url starred_url subscriptions_url
organizations_url repos_url events_url received_events_url type
site_admin name company blog location email hireable bio
public_repos public_gists followers following created_at updated_at
@poteto
poteto / ip_lookup.py
Created May 27, 2012 13:37
Batch IP Geolocation script
#!/usr/bin/python
# ip_lookup.py by poteto
#
# Batch processes many IP addresses, and traces their geolocation.
# The script outputs a .txt file which is then renamed to .csv, and is usable in Excel
#
# Use:
# 1. Save your user email and IP addresses in a .csv file
# - Each email and IP should be in its own column in Excel (or separated by commas)
# - Enter the name of your .csv file:
@poteto
poteto / controllers.application.js
Last active August 22, 2023 04:29
ember-changeset-validations demo
import Ember from 'ember';
import AdultValidations from '../validations/adult';
import ChildValidations from '../validations/child';
import { reservedEmails } from '../validators/uniqueness';
import { schema } from '../models/user';
const { get } = Ember;
const { keys } = Object;
export default Ember.Controller.extend({
@poteto
poteto / extract_filetype_from_zip.py
Created May 17, 2012 18:18
extract all files of filetype from many zip files
# extract_filetype_from_zip.py
# A simple script to extract all files of a certain filetype from many .zip files
# * Requires Python installed on local computer
VERSION = 0.1
#
# Place this file in the folder where you have all your zipfiles.
# Example use:
# - To extract only PDFs: extract_filetype('.pdf', '/folder') where folder (with the /) is the dir you store your zipfiles
# - 2nd argument is optional (defaults to root)

Lalassemble Code of Conduct

Welcome!

Lalassemble is a Discord server and linkshell community for the Aether datacenter in Final Fantasy XIV.

The current admins and mods are:

  • @milk#2755
import Ember from 'ember';
import { module } from 'qunit';
import startApp from 'livin/tests/helpers/start-app';
import OnboardPage from 'livin/tests/helpers/page-objects/onboard';
import { test } from 'qunit';
const { run } = Ember;
let application;
module('Acceptance | onboard', {
@poteto
poteto / lauren-tan-speaking.md
Last active August 28, 2020 21:59
Looking for a speaker for your upcoming tech conference? I'm an engineering leader and software engineer at Netflix and have done >15 talks at small to large conferences. I'm interested in speaking about TypeScript, JavaScript, React, GraphQL, Elixir/Phoenix, Microservices, Engineering leadership and/or management
@poteto
poteto / _media_queries.sass
Created October 22, 2012 13:54
Sass media queries
// Standard device screen widths
$iphone-portrait: 320px
$iphone-landscape: 480px
$ipad-portrait: 767px
$ipad-landscape: 980px
$desktop: 1224px
$desktop-large: 1824px
// General device targeting
// Use: Only use if you want the style to apply to many devices
@poteto
poteto / components.giphy-loader.js
Last active March 26, 2020 05:30
data loader components
import Ember from 'ember';
import { task, timeout } from 'ember-concurrency';
import GiphyClient from '../lib/giphy-client';
const { Component, computed, get, set, isBlank } = Ember;
const GIPHY_DEBOUNCE = 1000;
export default Component.extend({
init() {
this._super(...arguments);