Fullstack Examples - NodeJS, React, Redux
Elixir (Functional programming)
React Native
name: CI | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
db: | |
image: postgres | |
ports: ['5432:5432'] | |
env: |
require 'spec_helper' | |
describe "Activation Email" do | |
it "confirms the email when user clicks the confirmation link on activation email" do | |
register_new_user("john.smith@example.com", "adobe password", "adobe password") | |
activation_token = User.last.activation_code | |
expect( open_last_email.body).to have_link_with_endswith(activation_token) | |
visit activation_path(activation_token) | |
expect(page).to have_content( "Your email has been confirmed.") | |
end |
require 'date' | |
require "open-uri" | |
require 'json' | |
# This is just one big file, because it's easy to copy&paste (a.k.a. deploy) | |
# this script on a cheap VPN and set up a cronjob to run this once per day. | |
# | |
# | |
# Example output with Telegram markdown formatting | |
# shows the winning team and players who have goals or assists |
# Assuming that ~/.bash_aliases has the aliases defined | |
# These work on Bash, not sure what happens with other shells | |
# Run previous command | |
alias r='fc -s' | |
# Open .vimrc | |
alias vimrc="vim ~/.vimrc" | |
# Reload aliases |
#!/usr/bin/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
# | |
# Update 2013-06-24: added -w0 option to prevent truncated lines | |
# | |
# original source: https://embdev.net/topic/284710#3027030 (by Andreas Schwarz) | |
require 'base64' |
Fullstack Examples - NodeJS, React, Redux
Elixir (Functional programming)
React Native
// Preferences.sublime-settings | |
// Sublime Text 3, 28.1.2017 | |
{ | |
"auto_complete": true, | |
"auto_complete_commit_on_tab": true, | |
"auto_complete_with_fields": true, | |
"bold_folder_labels": true, | |
"default_encoding": "UTF-8", | |
"detect_indentation": true, |
# have_link_endswith.rb | |
module Capybara | |
module RSpecMatchers | |
class HaveLinkEndswith < Matcher | |
attr_reader :matching_value | |
def initialize(*args) | |
@matching_value = args.first | |
end |
This is how we test that all translation keys match up between locales.
Stuff that only goes in one locale (such as an admin section) or that can't be translated yet (if you use external translators) can simply go in files that don't match the path "config/locales/??.yml", like "config/locales/wip.fo.yml".
source "https://rubygems.org" | |
gem 'guard' | |
gem 'guard-livereload' | |
gem 'rack-livereload' |