Skip to content

Instantly share code, notes, and snippets.

View gabfiocchi's full-sized avatar
👨‍💻
Working

Gabriel Fiocchi gabfiocchi

👨‍💻
Working
View GitHub Profile
@font-face {
font-family: "TT Norms Pro";
font-weight: 400;
font-style: normal;
font-display: swap;
src: local("TT Norms Pro"),
url("https://static.cookunity.com/cross/front-lib/fonts/tt-norms-pro-normal.woff2") format("woff2"),
url("https://static.cookunity.com/cross/front-lib/fonts/tt-norms-pro-normal.woff") format("woff"),
url("https://static.cookunity.com/cross/front-lib/fonts/tt-norms-pro-normal.ttf") format("truetype");
}
const csvPath = 'hexatoimage.csv'
const fs = require('fs');
const path = require('path');
let data = [];
const convert = (hexValue) => {
let input = hexValue.replace(/[^A-Fa-f0-9]/g, "");
if (input.length % 2) {
@gabfiocchi
gabfiocchi / puppeteer-image-download.js
Last active October 21, 2021 19:09
puppeteer image download from API
import puppeteer, { Browser } from 'puppeteer';
import fs from 'fs';
import path from 'path';
const downloadImg = async (id: number, browser: Browser) => {
const [page] = await browser.pages();
await page.goto('https://endpoint.com/file/' + id);
@gabfiocchi
gabfiocchi / getImageFromUrl.ts
Created May 5, 2021 14:03 — forked from balvinder294/getImageFromUrl.ts
Method to take a Image url and fetch -- Tekraze.com
/* Method called from the UI */
getImage(imageUrl: string) {
this.getBase64ImageFromURL(imageUrl).subscribe((base64Data: string) => {
this.base64TrimmedURL = base64Data;
this.createBlobImageFileAndShow();
});
}
/* Method to fetch image from Url */
getBase64ImageFromURL(url: string): Observable<string> {
@gabfiocchi
gabfiocchi / README.md
Created February 12, 2021 09:53 — forked from escapedcat/README.md
Tutorial: Cordova iOS build with fastlane, match and Jenkins

Cordova CI with Jenkins for iOS apps

Inspired by CI server on Mac OS for iOS using GitLab and Fastlane by @v_shevchyk we decided to write down our approach. This will be extended and improved over time.

So you want to deploy your Cordova app, but you hate opening xcode manually to archive and export and sign and cry? Try this. By this we mean we try to explain how to create the following CI (Jenkins) setup:

  • Build Cordova app
  • Create & sign your ipa file
  • Upload to HockeyApp (for Enterprise distribution)
@gabfiocchi
gabfiocchi / index.php
Created February 3, 2021 15:02 — forked from kosso/index.php
Proxy script for Shoutcast audio streams.
<?php
// Proxy script for Shoutcast audio streams.
// Overcomes the CORS issue when using JavaScript to fetch streams for playback and analysis.
// Also http > https
/*
// .htaccess file
// eg: index.php and .htaccess in /radio on your host.
// Point JS/fetch to https://yourhost/radio/audio.mp3 (or any made-up .mp3 name)
@gabfiocchi
gabfiocchi / widget-html-css-scriptable-jobs.js
Created September 23, 2020 12:33 — forked from dcatanzaro/widget-html-css-scriptable-jobs.js
Widget con HTML y CSS en Scriptable
//Twitter: https://twitter.com/DamianCatanzaro
const html = "<html> \
<head> \
<style> \
body { \
margin: 0; \
background-color: cyan; \
width: 500px; \
height: 500px; \
# DO NOT MODIFY -- auto-generated by Apache Cordova
source 'https://cdn.cocoapods.org/'
platform :ios, '11.0'
use_frameworks!
def google_utilites
pod 'GoogleUtilities/AppDelegateSwizzler'
pod 'GoogleUtilities/Environment'
pod 'GoogleUtilities/ISASwizzler'
pod 'GoogleUtilities/Logger'
pod 'GoogleUtilities/MethodSwizzler'
//
// NotificationService.m
// NotificationService
//
// Created by Gabriel Fiocchi on 5/7/20.
//
// Create a new Notification Service Extension
// In Xcode, File -> New -> Target -> Notification Service Extension
// Name it and save it ( I used NotificationService but you can use whatever )
// More information:
$ cd ~
$ sudo curl -sS https://getcomposer.org/installer | sudo php
$ sudo mv composer.phar /usr/local/bin/composer
$ sudo ln -s /usr/local/bin/composer /usr/bin/composer
then you can run
$ sudo composer install