Skip to content

Instantly share code, notes, and snippets.

View yhauxell's full-sized avatar
⌨️
Coding, always!

Yausell Ruiz yhauxell

⌨️
Coding, always!
View GitHub Profile
@yhauxell
yhauxell / coingecko-api-google-sheet.js
Last active July 19, 2022 09:03
Get coin data from CoinGecko API into google sheet
function COINGECKO(input = 'bitcoin', property = 'all', currency = 'usd') {
Logger.log(`Search for #> ${input} @prop: ${property} @currency: ${currency}`);
const cache = CacheService.getScriptCache();
let coinData = cache.get(input);
if(!coinData){
Logger.log('No cached coin data found! Let\'s fetch the api');
const URL = `https://api.coingecko.com/api/v3/coins/markets?vs_currency=${currency}&ids=${input}&price_change_percentage=24h,7d,14d,30d,1y`;
try{
@efstathiosntonas
efstathiosntonas / index.js
Created January 11, 2018 14:02
Facebook Ads every X posts in React Native Flatlist
import React, {Component} from 'react';
import {ActivityIndicator, AsyncStorage, Dimensions, FlatList, LayoutAnimation, StyleSheet, Text, TouchableHighlight, TouchableOpacity, View, Alert, Platform} from 'react-native';
import Icon from 'react-native-vector-icons/Ionicons';
import {Card, CardImage, CardTitle} from 'react-native-material-cards';
import ActionButton from 'react-native-circular-action-menu';
import ImagePicker from 'react-native-image-crop-picker';
import {MaterialIndicator} from 'react-native-indicators';
import Storage from 'react-native-storage';
import {EventRegister} from 'react-native-event-listeners';
import shortid from 'shortid';
@bryanstedman
bryanstedman / detect_retina.js
Created January 11, 2013 05:25
Detect retina display with javascript
var retina = window.devicePixelRatio > 1;
if (retina) {
// the user has a retina display
}
else {
// the user has a non-retina display
}