Skip to content

Instantly share code, notes, and snippets.

View OlivierJM's full-sized avatar
🇿🇲

Olivier JM Maniraho OlivierJM

🇿🇲
View GitHub Profile
{
"breakpoints": {
"keys": [
"xs",
"sm",
"md",
"lg",
"xl"
],
"values": {
@OlivierJM
OlivierJM / moment-js-timezones.txt
Created September 22, 2021 09:19 — forked from diogocapela/moment-js-timezones.txt
List of All Moment.js Timezones
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Asmera
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau

Dropping Migration Table, Models, Controller

Command Line

1. Drop Table/Migration

rails generate migration DropTablename

A file will be created, in the db > migrate folder, make sure it looks like:

@OlivierJM
OlivierJM / nil_empty_blank_present_ffdierence_in_ruby
Created December 2, 2020 09:16 — forked from pythonicrubyist/nil_empty_blank_present_ffdierence_in_ruby
Difference between nil?, empty?, blank? and present? in Ruby and Ruby on Rasils.
# nil? can be used on any Ruby object. It returns true only if the object is nil.
nil.nil? # => true
[].nil? # => false
{}.nil? # => false
"".nil? # => false
" ".nil? # => false
true.nil? # => false
# empty? can be used on some Ruby objects including Arrays, Hashes and Strings. It returns true only if the object's length is zero.
nil.empty? # NoMethodError: undefined method `empty?' for nil:NilClass
@OlivierJM
OlivierJM / directUploading.ts
Created October 13, 2020 12:31 — forked from saionaro/directUploading.ts
A direct file uploading, react native edition
//...
// some interfaces imports skipped
//...
const createDirectUploadMutation = `
mutation createDirectUploadMutation(
$filename: String!
$byteSize: Int!
$contentType: String!
) {
@OlivierJM
OlivierJM / System Design.md
Created July 8, 2019 10:34 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@OlivierJM
OlivierJM / introrx.md
Created December 20, 2018 17:45 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure that the project is building successfully
@OlivierJM
OlivierJM / HOC.js
Created July 19, 2018 09:38 — forked from Restuta/HOC.js
React HOC (Higher Order Component) Example
/* HOC fundamentally is just a function that accepts a Component and returns a Component:
(component) => {return componentOnSteroids; } or just component => componentOnSteroids;
Let's assume we want to wrap our components in another component that is used for debugging purposes,
it just wraps them in a DIV with "debug class on it".
Below ComponentToDebug is a React component.
*/
//HOC using Class
//it's a function that accepts ComponentToDebug and implicitly returns a Class
let DebugComponent = ComponentToDebug => class extends Component {