Skip to content

Instantly share code, notes, and snippets.

View krvajal's full-sized avatar
:electron:
What's happening?

Miguel Carvajal krvajal

:electron:
What's happening?
  • @wearesinch
  • Antwerpen, Belgium
View GitHub Profile

Keybase proof

I hereby claim:

  • I am krvajal on github.
  • I am krvajal (https://keybase.io/krvajal) on keybase.
  • I have a public key ASDHNuzGcu7gUTXEEihUhMGUoazv-SGuW0EG48Ukd7duXgo

To claim this, I am signing this object:

---
layout: default
title: For Sale
section: for-sale
nofooter: true
---
{% include components.breadcrumb.html %}
<div class="c-properties">
// V1
export class NotificationsRequests extends SweepbrightCrudRequest {
constructor() {
super();
// @ts-ignore
this.setMiddlewares([parseJson, response => response.data]);
}
getAll = (attributes: { page: number }): Promise<NotificationsResponse> => {
import React, {
cloneElement,
useState,
useEffect,
useRef,
HTMLAttributes,
ReactElement
} from "react";
////////////////////////////////////////////////////////////////////////////////
@krvajal
krvajal / aa.rb
Last active November 7, 2018 07:03
def prime?(number, primes)
true unless !primes.empty?
to_check = primes.select do |x|
x*x < number
end
to_check.any? do |divisor|
# puts "#{number}, #{divisor}"
(number % divisor).zero?
end
end
# Enter your code here. Read input from STDIN. Print output to STDOUT
N = gets.to_i
def reverse(number)
result = 0
while number > 0
result = result * 10 + number % 10
number /= 10
end
result
console.log(
`%c label %c ...message... %c !!! `,
"background-color: #f00; color: #fff; padding: 2px; font-weight: bold;",
"background-color: #fcc; padding: 2px;",
"background-color: #f00; color: #fff; padding: 2px; font-weight: bold;",
);
// https://twitter.com/brian_d_vaughn/status/1025045172818563072
import React, { Component } from 'react';
import { Text, View, StyleSheet } from 'react-native';
import { Slider } from 'react-native-elements';
import { Constants } from 'expo';
// You can import from local files
import AssetExample from './components/AssetExample';
// or any pure javascript modules available in npm
import { Card } from 'react-native-elements'; // Version can be specified in package.json
@krvajal
krvajal / prettier-branch.sh
Last active June 25, 2018 14:25 — forked from tlrobinson/prettier-branch.sh
Steps for merging an old branch into a newly prettier-ified codebase. Use at your own risk, verify everything was correctly merged.
# Assumes 3 sequential commits:
#
# 1. commit tagged "prettier-before" that added `prettier` depedency and `prettier` script your package.json
# 2. commit that actually ran `prettier` on your entire codebase for the first time
# 3. commit tagged "prettier-after" that fixes any minor issues caused by prettier (e.x. moving eslint-ignore or $FlowFixMe comments around), or just the next commit if there were none
#
# I recommend running these as individual commands, not as a script, in case of merge conflicts
# In the sweepbright app this commits have the following hashes
# $prettier-before 👉 352f43227d9ae5de0de92b48158d0f02feb7588c
# $prettier-after 👉 5330ac90e7adf6f0867228680686f6aaedd8b065
import React, { Component } from 'react';
import { Text, View, StyleSheet, ScrollView, Image, Animated } from 'react-native';
import { Constants } from 'expo';
// You can import from local files
import AssetExample from './components/AssetExample';
// or any pure javascript modules available in npm
import { Card } from 'react-native-elements'; // 0.18.5