Skip to content

Instantly share code, notes, and snippets.

@andyyang
andyyang / gist:943d6f4b01cb5969727c3de6740bdcb5
Last active May 8, 2020 23:10
Trigger Github Actions from Jenkins Pipeline in Openshift
Trigger Github Actions from Jenkins Pipeline in Openshift
============================================================
### What is Github Actions?
### Environment
* <b> Openshift</b> : 3.11
@andyyang
andyyang / gist:941c256eddd5e988aab78ab4860009a1
Created January 25, 2020 07:55
The process flow of code
on first login:
call getJwtToken:
if success(when redirected back to the pen request backend) -> call getUserInfo
if fail(on first visit) -> don't call getUserInfo
on follow up visits or when refreshing page:
if token isn't expired:
call refreshAuthToken:
if success -> call getUserInfo
if fail(when backend has restarted) -> logout
@andyyang
andyyang / get_min.rb
Last active June 18, 2019 08:30
coding challenge
$sqrts = {}
def is_perfect_square(s)
($sqrts[s] ||= Math.sqrt(s.to_i(16)).denominator) == 1
end
def split_str(s)
(1...s.length).map do |length|
[s[0, length], s[length..-1]]
end
@andyyang
andyyang / heroku_deployment.md
Created December 14, 2017 04:54 — forked from matt297/heroku_deployment.md
Lighthouse Labs - Intro to Web Dev - W6D2 - Deploying Finstagram to Heroku

Deploying Finstagram to Heroku

These instructions will help you deploy your Finstagram app to Heroku (a web hosting service), so that the entire internet will be able to see and interact with your application! Before we get to deployment though, we need to make sure a couple of our files are setup properly.

Pre-Deployment: Edit Your Gemfile

Ensure your Gemfile file contains the following code (should match exactly).

source "https://rubygems.org"

gem 'rake'
gem 'activesupport'
@andyyang
andyyang / RAILS_CHEATSHEET.md
Created December 7, 2017 08:04 — forked from mdang/RAILS_CHEATSHEET.md
Ruby on Rails Cheatsheet

Ruby on Rails Cheatsheet

Architecture

Create a new application

Install the Rails gem if you haven't done so before

a famous inventor
https://docs.google.com/presentation/d/1shAZTmjjrE76OSe8iSyRriGsy5Mfx8eSi2z4BwA9ma0/edit?usp=sharing