Skip to content

Instantly share code, notes, and snippets.

View hotsen's full-sized avatar
💭
Pending

Alexander hoth hotsen

💭
Pending
View GitHub Profile
@hotsen
hotsen / Button.js
Created December 2, 2017 05:36 — forked from nickw/Button.js
Cross-platform Button component for React Native
import React, { Component } from 'react';
import {
Text,
View,
Platform,
TouchableHighlight,
TouchableOpacity,
TouchableNativeFeedback,
} from 'react-native';
@hotsen
hotsen / app-icons.js
Created November 26, 2017 20:38
Load vector icons as sourceMap in React Native
// Define all your icons once,
// load them once,
// and use everywhere
import Ionicons from 'react-native-vector-icons/Ionicons';
import FontAwesome from 'react-native-vector-icons/FontAwesome';
// define your suffixes by yourself..
// here we use active, big, small, very-big..
const replaceSuffixPattern = /--(active|big|small|very-big)/g;
@hotsen
hotsen / Dockerfile
Created November 25, 2017 00:44 — forked from hubertlepicki/Dockerfile
Ruby 2.4.1, Rails 5.1.1, PostgreSQL, Docker + docker-compose config files
FROM phusion/baseimage:0.9.22
CMD ["/sbin/my_init"]
RUN add-apt-repository -y ppa:brightbox/ruby-ng
RUN apt-get update
RUN apt-get install -y libpq-dev git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev nodejs wget autoconf tzdata ruby2.4 ruby2.4-dev rubygems ruby-switch
RUN ruby-switch --set ruby2.4
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
@hotsen
hotsen / init.sh
Created October 16, 2017 11:32 — forked from charity/init.sh
terraform environment init.sh
#!/bin/bash
# Usage: ./init.sh once to initialize remote storage for this environment.
# Subsequent tf actions in this environment don't require re-initialization,
# unless you have completely cleared your .terraform cache.
#
# terraform plan -var-file=./production.tfvars
# terraform apply -var-file=./production.tfvars
tf_env="production"
Gem::Version.new('0.3.2') < Gem::Version.new('0.10.1')
=> true
Gem::Version.new('0.3.0') == Gem::Version.new('0.3')
=> true
@hotsen
hotsen / aurora_cluster.tf
Created September 5, 2017 13:16 — forked from sandcastle/aurora_cluster.tf
Creates a AWS RDS Aurora Cluster with Terraform
########################
## Variables
########################
variable "environment_name" {
description = "The name of the environment"
}
variable "vpc_id" {
@hotsen
hotsen / Gemfile
Created August 18, 2017 00:48 — forked from rmosolgo/Gemfile
GraphQL Ruby Subscriptions
source 'https://rubygems.org'
gem "graphql", github: "rmosolgo/graphql-ruby", branch: "subscriptions"
gem "sinatra"
gem "thin"
@hotsen
hotsen / base58.rb
Created August 9, 2017 06:12 — forked from jou/base58.rb
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# Version 2, December 2004
#
# Copyright (C) 2004 Sam Hocevar
# 14 rue de Plaisance, 75014 Paris, France
# Everyone is permitted to copy and distribute verbatim or modified
# copies of this license document, and changing it is allowed as long
# as the name is changed.
#
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@hotsen
hotsen / RNfontWeights.js
Created August 7, 2017 20:14 — forked from knowbody/RNfontWeights.js
React Native Font Weight Cheatsheet iOS
{ fontWeight: '100' }, // Thin
{ fontWeight: '200' }, // Ultra Light
{ fontWeight: '300' }, // Light
{ fontWeight: '400' }, // Regular
{ fontWeight: '500' }, // Medium
{ fontWeight: '600' }, // Semibold
{ fontWeight: '700' }, // Bold
{ fontWeight: '800' }, // Heavy
{ fontWeight: '900' }, // Black
# Usage:
# ========
# FirebaseAuth::Auth.verify_id_token(your_id_token)
#
# The method call follows the same API of the Node.js, JAVA and Python SDKs.
# See https://firebase.google.com/docs/auth/admin/verify-id-tokens#verify_id_tokens_using_the_firebase_admin_sdk
# Dependencies:
# ---------------
# gem 'activesupport'