Skip to content

Instantly share code, notes, and snippets.

View enzolarosa's full-sized avatar

Vincenzo La Rosa enzolarosa

View GitHub Profile
@enzolarosa
enzolarosa / nginx-satis.conf
Created May 11, 2022 11:39
satis nginx http basic authentication with laravel
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name satis.yousite.ext;
server_tokens off;
root /home/forge/satis.yousite.ext/public;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
@enzolarosa
enzolarosa / CloudFlareClearDNS.php
Created May 4, 2022 13:40
Delete all dns from cloudflare
<?php
namespace App\Console\Commands;
use Http;
use Illuminate\Console\Command;
class CloudFlareClearDNS extends Command
{
protected $signature = 'cloudflare:clear-dns
@enzolarosa
enzolarosa / cordova-file-storage.js
Created February 5, 2020 15:41 — forked from john-doherty/cordova-file-storage.js
An easy way to read/write files in Cordova
var fileStorage = {
/**
* Saves a file on the device
* @param {string} name - filename (can include sub folders)
* @param {string} data - file contents
* @param {boolean} useSandbox - uses protected sandbox if true, otherwise external (default false)
* @returns {Promise} executes .then with saved file path as first param
*/
write: function (name, data, useSandbox) {
@enzolarosa
enzolarosa / gist:f9f013e89493d5eade090ee9483fe72a
Created November 4, 2019 16:38 — forked from jamzi/gist:aff85aa192b8addab2b560db5d849a2a
Electron-builder - Building Windows app on Linux (Docker image)
docker run --rm -ti \
--env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS_TAG|TRAVIS|TRAVIS_REPO_|TRAVIS_BUILD_|TRAVIS_BRANCH|TRAVIS_PULL_REQUEST_|APPVEYOR_|CSC_|GH_|GITHUB_|BT_|AWS_|STRIP|BUILD_') \
--env ELECTRON_CACHE="/root/.cache/electron" \
--env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" \
-v ${PWD}:/project \
-v ${PWD##*/}-node-modules:/project/node_modules \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
electronuserland/builder:wine
@enzolarosa
enzolarosa / install-firacode.sh
Created May 31, 2019 16:19 — forked from nikhita/install-firacode.sh
How to install FiraCode font on Linux
mkdir -p ~/.local/share/fonts
for type in Bold Light Medium Regular Retina; do wget -O ~/.local/share/fonts/FiraCode-$type.ttf "https://github.com/tonsky/FiraCode/blob/master/distr/ttf/FiraCode-$type.ttf?raw=true"; done
fc-cache -f