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 '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, |
function _git_prompt() { | |
local git_status="`git status -unormal 2>&1`" | |
if ! [[ "$git_status" =~ Not\ a\ git\ repo ]]; then | |
if [[ "$git_status" =~ nothing\ to\ commit ]]; then | |
local ansi=42 | |
elif [[ "$git_status" =~ nothing\ added\ to\ commit\ but\ untracked\ files\ present ]]; then | |
local ansi=43 | |
else | |
local ansi=45 | |
fi |
--colour | |
-I app |
require 'spec_helper' | |
describe "Activation Email" do | |
it "confirms the email when user clicks the confirmation link on activation email" do | |
register_new_user("[email protected]", "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 |
# have_link_endswith.rb | |
module Capybara | |
module RSpecMatchers | |
class HaveLinkEndswith < Matcher | |
attr_reader :matching_value | |
def initialize(*args) | |
@matching_value = args.first | |
end |