Skip to content

Instantly share code, notes, and snippets.

Avatar
🤖
Building

Guillermo guillefd

🤖
Building
View GitHub Profile
@julianpoemp
julianpoemp / .angular-htaccess.md
Last active May 23, 2023 05:28
Optimal .htaccess configuration for Angular 15, Angular 14, Angular 13, Angular 12, Angular 11, Angular 10, Angular 9, Angular 8, Angular 7, Angular 6, Angular 5 (and older) app in production incl. fix for the angular browser caching issue.
View .angular-htaccess.md

New generator

I created a new htaccess generator for angular apps that makes it easier for you to create the optimal htaccess file: https://julianpoemp.github.io/ngx-htaccess-generator/

The goal of this generator is to create the optimal .htaccess file for Angular apps easily. By default the generator creates an .htaccess file that solves the route redirection issue. To make it easier for you I created a kind of interview mode with some questions. As an additional feature the generator supports adding exclusions for example if you have installed a blog in a subdirectory of your web application and more!

The generator 😁: https://julianpoemp.github.io/ngx-htaccess-generator/

The project: https://github.com/julianpoemp/ngx-htaccess-generator

@wesbos
wesbos / async-await.js
Created February 22, 2017 14:02
Simple Async/Await Example
View async-await.js
// 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works
const axios = require('axios'); // promised based requests - like fetch()
function getCoffee() {
return new Promise(resolve => {
setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee
});
}
@bekce
bekce / README.md
Created February 13, 2017 11:46
Node.js IMAP client with parsing
View README.md

This example connects to an imap server and retrieves emails

npm install imap mailparser

@btroncone
btroncone / rxjs_operators_by_example.md
Last active April 28, 2023 21:16
RxJS 5 Operators By Example
View rxjs_operators_by_example.md
@pisculichi
pisculichi / radios_nacionales.txt
Last active May 8, 2023 18:38
URLs de radios nacionales de Argentina, para poder escuchar en la terminal con mplayer o vlc
View radios_nacionales.txt
# alias radio='function __radio(){ r=`grep -v "#" radios_nacionales.txt | grep -m 1 -i $1 | cut -d" " -f1`; cvlc $r 2> /dev/null; }; __radio'
# podria utilizarse mplayer en vez de vlc
AMs Nacionales
http://cdn.instream.audio:9288/stream Radio Madre 530
https://streaming1.hostingmontevideo.com:7019/; Radio Colonia 550
http://server.laradio.online:25224/live.mp3 Radio Argentina 570
http://playerservices.streamtheworld.com/api/livestream-redirect/CONTINENTAL_SC Continental 590
https://streammax.alsolnet.com/radiorivadavia Rivadavia 630
@danharper
danharper / CatchAllOptionsRequestsProvider.php
Last active May 23, 2022 04:03
Lumen with CORS and OPTIONS requests
View CatchAllOptionsRequestsProvider.php
<?php namespace App\Providers;
use Illuminate\Support\ServiceProvider;
/**
* If the incoming request is an OPTIONS request
* we will register a handler for the requested route
*/
class CatchAllOptionsRequestsProvider extends ServiceProvider {
@codeguy
codeguy / slugify.js
Created September 24, 2013 13:19
Create slug from string in Javascript
View slugify.js
function string_to_slug (str) {
str = str.replace(/^\s+|\s+$/g, ''); // trim
str = str.toLowerCase();
// remove accents, swap ñ for n, etc
var from = "àáäâèéëêìíïîòóöôùúüûñç·/_,:;";
var to = "aaaaeeeeiiiioooouuuunc------";
for (var i=0, l=from.length ; i<l ; i++) {
str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i));
}