Skip to content

Instantly share code, notes, and snippets.

View riccardogiorato's full-sized avatar
🏠
Working from home

Riccardo Giorato riccardogiorato

🏠
Working from home
View GitHub Profile
@riccardogiorato
riccardogiorato / gist:b1115f48b76f227ea86c25a9c4414025
Last active September 11, 2019 11:37
new iOS version support on old Xcode versions
git clone https://github.com/iGhibli/iOS-DeviceSupport
cd iOS-DeviceSupport
sudo ./deploy.py
@riccardogiorato
riccardogiorato / chocolateytips.ps1
Created September 15, 2019 18:03
chocolatey windows tips
# Automatically install the packages without having to type [Y]es for each one
choco feature enable -n allowGlobalConfirmation
# Utility Softwares
choco install ccleaner vlc ccleaner telegram slack 7zip -y
# Development and Programming stuff
choco install vscode git git-lfs sourcetree nodejs yarn -y
# WARNING: by removing all metro pre-installed apps you will remove also the Microsoft store
# and to restore it you have to type the following commands:
Set-ExecutionPolicy Unrestricted
.\reinstall-preinstalledapps.ps1 *Microsoft.WindowsStore*
Set-ExecutionPolicy Restricted
@riccardogiorato
riccardogiorato / choco upgrade all
Created September 15, 2019 19:32
choco upgrade all
choco upgrade all
@riccardogiorato
riccardogiorato / supercrawler.js
Created September 15, 2019 20:40
supercrawler.js bot example
var supercrawler = require("supercrawler");
var crawler = new supercrawler.Crawler({
// Tme (ms) between requests
interval: 1000,
// Maximum number of requests at any one time.
concurrentRequestsLimit: 5,
// Time (ms) to cache the results of robots.txt queries.
robotsCacheTime: 3600000,
// Query string to use during the crawl.
@riccardogiorato
riccardogiorato / headless-chrome-crawler.js
Created September 15, 2019 20:43
headless-chrome-crawler example bot
const HCCrawler = require('headless-chrome-crawler');
console.log('Starting the fetch');
const singlePage = false;
let maxDepthCrawler = 6;
if(singlePage)
maxDepthCrawler=1;
const makeupPageUrl = 'http://scrapoxy.io/';
google-chrome --product-version
import "./styles.css";
import React from "react";
import ReactDOM from "react-dom";
import ApolloClient from "apollo-boost";
import { ApolloProvider } from "@apollo/react-hooks";
import App from "./App";
const client = new ApolloClient({
uri: "https://api.graph.cool/simple/v1/swapi"
import React, { Fragment } from "react";
import { useQuery } from "@apollo/react-hooks";
import { gql } from "apollo-boost";
const STAR_WARS_FILMS = gql`
{
allFilms(first: 6, orderBy: releaseDate_ASC) {
episodeId
title
{
allFilms(first: 3, orderBy: releaseDate_ASC) {
episodeId
title
releaseDate
director
}
}