Steps to deploy Node.js to VPS using PM2 and Github Actions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Whereable | |
def initialize(where:, model: Item, ranking_conditions: [], valid: true, data_source: nil) | |
@model = model | |
@where = where | |
@data_source = data_source | |
@ranking_conditions = ranking_conditions | |
@valid = valid | |
end | |
def valid? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ModelBase | |
def self.enum(**kwargs) | |
kwargs.each do |key, values| | |
define_method("#{key}=") do |v| | |
if values.include?(v) | |
instance_variable_set("@#{key}", v) | |
else | |
raise "Not a valid status: #{v}" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body onload=z=c.getContext`2d`,setInterval(`c.width=W=150,Y<W&&P<Y&Y<P+E|9<p?z.fillText(S++${Y=`,9,9|z.fillRect(p`}*0,Y-=--M${Y+Y},P+E,9,W),P))):p=M=Y=S=6,p=p-6||(P=S%E,W)`,E=49) onclick=M=9><canvas id=c> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! Aaaaaaaaaaa this is JS!!! | |
// https://github.com/tc39/proposal-hashbang | |
// This file is mixing all new syntaxes in the proposal in one file without considering syntax conflict or correct runtime semantics | |
// Enjoy!!! | |
// Created at Nov 23, 2018 | |
for await(const x of (new A // https://github.com/tc39/proposal-pipeline-operator | |
|> do { // https://github.com/tc39/proposal-do-expressions | |
case(?) { // https://github.com/tc39/proposal-pattern-matching | |
when {val}: class { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface UseApiResult< | |
T, | |
TExecuteFactory extends (...args: any) => Promise<T | undefined>, | |
TError = any | |
> { | |
result: Ref<T | null>; | |
isLoading: Ref<boolean>; | |
error: Ref<TError | null>; | |
execute: TExecuteFactory; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
groups: | |
- docker | |
users: | |
- default | |
# the docker service account | |
- name: docker-service | |
groups: docker | |
package_upgrade: true | |
packages: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Inherit from TODO here to make sure we enforce the rules below | |
# (and TODO is ignored) | |
inherit_from: | |
- .rubocop_todo.yml | |
Lint/Debugger: # don't leave binding.pry | |
Enabled: true | |
Exclude: [] | |
RSpec/Focus: # run ALL tests on CI |
vi /etc/environment
add these lines...
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
Alternatively,
NewerOlder