Skip to content

Instantly share code, notes, and snippets.

View talcual's full-sized avatar
💭
Magic Code

Luis Toscano talcual

💭
Magic Code
View GitHub Profile
var express = require('express');
var router = express.Router();
var Notas = require('../models/Notas');
/* Creating Device */
router.post('/create', async function(req, res, next) {
try {
var express = require('express');
var router = express.Router();
var Publicaciones = require('../models/Publicaciones');
/* Creating Device */
router.post('/create', async function(req, res, next) {
try {
@talcual
talcual / forceDownload.js
Created December 1, 2021 01:39 — forked from jmcarp/forceDownload.js
Forcing a file download in JavaScript
function forceDownload(href) {
var anchor = document.createElement('a');
anchor.href = href;
anchor.download = href;
document.body.appendChild(anchor);
anchor.click();
}
@talcual
talcual / image2grf.php
Created May 5, 2021 16:19 — forked from thomascube/image2grf.php
PHP function to convert a PNG image to a .GRF file for use with Zebra printers
<?php
/**
* Converts a PNG image to a .GRF file for use with Zebra printers
*
* The input is preferably a 1-bit black/white image but RGB images
* are accepted as well.
*
* This function uses PHP's GD library image functions.
*
@talcual
talcual / hotspot.md
Created March 1, 2021 01:39 — forked from robertov8/hotspot.md
Install Hotspot + Mysql + Portal Captive + WifiDog + Authpuppy

Hotspot + Portal Captive

Dependencias

  • Header Kernel - GCC

sudo apt-get install linux-headers

  • Pacotes essenciais
@talcual
talcual / InstallLaravelOnIIS.bash
Created February 8, 2021 19:52 — forked from epjuan21/InstallLaravelOnIIS.bash
Instalar Laravel en Windows Server IIS
## Instalar Laravel 5.7 en Windows Server 2012 R2 Sobre Internet Information Services
# Nos ubicamos en la carpeta de IIS C:\inetpub\wwwroot
# Ejecutamos el siguiente comando en la terminal
composer create-project --prefer-dist laravel/laravel blog "5.7.*"
## Configurar el Proyecto en IIS
@talcual
talcual / ICS.php
Created June 23, 2020 06:06 — forked from jakebellacera/ICS.php
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
@talcual
talcual / README.md
Created May 31, 2020 04:28 — forked from mrbar42/README.md
Secured HLS setup with Nginx as media server

Secured HLS setup with Nginx as media server

This example is part of this article.

This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:

  • Domain filtering
  • Referrer filtering
  • Embed buster
@talcual
talcual / stream_to_youtube.sh
Created May 6, 2020 02:45 — forked from olasd/stream_to_youtube.sh
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube
@talcual
talcual / ffmpeg-compress-mp4
Created March 16, 2020 05:14 — forked from lukehedger/ffmpeg-compress-mp4
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4