This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"strings" | |
"time" | |
) | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adduser username | |
usermod -aG sudo username | |
ufw limit 22 | |
apt update && apt dist-upgrade -y | |
# install mino | |
rsync -avz minio.service [email protected]:/home/username | |
# instal nginx and let's encrypt https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04 | |
sudo add-apt-repository ppa:certbot/certbot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FOR /R %f IN (*.jpg) DO mogrify -verbose -quality 75 "%f" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// convert mp3 to mp4 file | |
Measure-Command { ffmpeg -i 1.mp3 -shortest -b 1000k -acodec copy 3.mp4 } | |
// Crop mp4 file to ts file | |
Measure-Command { ffmpeg -i .\output.mp4 -c:v h264 -flags +cgop -g 30 -hls_time 1 -strict -2 -hls_playlist_type 2 2/out.m3u8 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <QtCore/QCoreApplication> | |
#include <QDebug> | |
#define __STDC_CONSTANT_MACROS | |
#define __STDC_LIMIT_MACROS | |
#define UINT64_C | |
#define WinMain@16 | |
#include "fcntl.h" | |
int f_desw; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Mvc; | |
using System.IO; | |
using Microsoft.AspNetCore.Hosting; | |
namespace VideoServing.Controllers | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var artists=["Justin Bieber", "Justin Bieber", "Drake Featuring WizKid & Kyla", "Rihanna Featuring Drake", "twenty one pilots", "Desiigner", "Adele", "The Chainsmokers Featuring Daya", "Justin Timberlake", "The Chainsmokers Featuring Halsey", "Sia Featuring Sean Paul", "Lukas Graham", "Rihanna", "Flo Rida", "Mike Posner", "Fifth Harmony Featuring Ty Dolla $ign", "Calvin Harris Featuring Rihanna", "DNCE", "G-Eazy x Bebe Rexha", "twenty one pilots", "twenty one pilots", "Zayn", "Shawn Mendes", "Drake", "Major Lazer Featuring Justin Bieber & MO", "Adele", "The Chainsmokers Featuring Rozes", "Shawn Mendes", "Drake Featuring Rihanna", "Future Featuring The Weeknd", "Justin Bieber", "The Weeknd", "P!nk", "D.R.A.M. Featuring Lil Yachty", "Bryson Tiller", "Ariana Grande", "Drake & Future", "gnash Featuring Olivia O'Brien", "Alessia Cara", "Selena Gomez", "Drake", "Meghan Trainor Featuring John Legend", "Charlie Puth", "James Bay", "Meghan Trainor", "Zara Larsson & MNEK", "DJ Snake Featuring Justin Bie |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Task SendEmailAsync(string email, string subject, string message) | |
{ | |
var msg = new MimeMessage(); | |
msg.From.Add(new MailboxAddress(EmailConfig.From, EmailConfig.FromEmail)); | |
msg.To.Add(new MailboxAddress("", email)); | |
msg.Subject = subject; | |
var bodyBuilder = new BodyBuilder(); | |
bodyBuilder.HtmlBody = message; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.hr-div { | |
padding: 10px; | |
} | |
.hr-div div { | |
border-top: 1px solid #f68e92; | |
position: absolute; | |
width: 100vw; | |
left: 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lan.dk.podcastserver.utils.MimeTypeUtils; | |
import org.apache.commons.lang3.StringUtils; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import javax.servlet.ServletOutputStream; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
import java.io.*; | |
import java.nio.file.Files; |
NewerOlder