- Generate new rails app using
--webpack
flag
rails new myApp --webpack=vue
Note:
- You can use
--webpack=angular
for angular application and--webpack=react
for react.
-- Based off IETF draft, https://datatracker.ietf.org/doc/draft-peabody-dispatch-new-uuid-format/ | |
create or replace function uuid_generate_v7() | |
returns uuid | |
as $$ | |
begin | |
-- use random v4 uuid as starting point (which has the same variant we need) | |
-- then overlay timestamp | |
-- then set version 7 by flipping the 2 and 1 bit in the version 4 string | |
return encode( |
import { useState, useEffect } from "react"; | |
import { AsyncStorage } from "react-native"; | |
function useAsyncStorage(key, initialValue) { | |
const [storedValue, setStoredValue] = useState(initialValue); | |
useEffect(() => { | |
AsyncStorage.getItem(key) | |
.then(value => { | |
if (value === null) return initialValue; |
# .github/workflows/main.yaml | |
name: Main | |
on: [push] | |
jobs: | |
vm-job: | |
name: CI | |
runs-on: ubuntu-latest |
#! /usr/bin/env ruby | |
# This script can be used to parse and dump the information from | |
# the 'html/contact_info.htm' file in a Facebook user data ZIP download. | |
# | |
# It dumps all cell phone call + SMS message + MMS records, plus a summary of each. | |
# | |
# Place this script inside the extracted Facebook data download folder | |
# alongside the 'html' folder. | |
# |
FROM ruby:2.4 | |
## In case of postgresql for heroku: | |
# RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" >> /etc/apt/sources.list.d/postgeresql.list \ | |
# && wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \ | |
# && apt-get update \ | |
# && apt-get update \ | |
# && apt-get install -y --no-install-recommends \ | |
# postgresql-client-9.6 pv ack-grep ccze unp htop vim \ | |
# && rm -rf /var/lib/apt/lists/* \ |
This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :
stats = Sidekiq::Stats.new | |
stats.queues | |
stats.enqueued | |
stats.processed | |
stats.failed |