Skip to content

Instantly share code, notes, and snippets.

View uwejan's full-sized avatar
🎯
Focusing

Sam UWEJAN uwejan

🎯
Focusing
View GitHub Profile
@uwejan
uwejan / php-restrictions.nginxconf
Created March 20, 2022 18:51 — forked from Ellrion/php-restrictions.nginxconf
Nginx + Php-fpm config for Laravel app
# /etc/nginx/global/php-restrictions.conf
# Don't throw any errors for missing favicons and don't display them in the logs
location = /favicon.ico {
log_not_found off;
access_log off;
}
# Don't log missing robots or show them in the nginx logs
location = /robots.txt {
allow all;
@uwejan
uwejan / api.dart
Created July 20, 2020 19:36 — forked from alexd1971/api.dart
Dart file upload
import 'dart:async';
import 'dart:io';
import 'package:mime/mime.dart';
import 'package:shelf/shelf.dart' as shelf;
import 'package:shelf_rest/shelf_rest.dart';
class Api {
@Post('upload')
Future upload(shelf.Request request) async {
@uwejan
uwejan / install_monaco_font.sh
Created July 5, 2018 11:20 — forked from rogerleite/install_monaco_font.sh
Install Monaco font in Linux
#!/bin/bash
#script extraido de: http://paulocassiano.wordpress.com/2008/08/29/deixando-o-gedit-com-a-cara-do-textmate/
#tip for better "resolution" here: http://blog.siverti.com.br/2008/05/22/fonte-monaco-no-ubuntugedit/
cd /usr/share/fonts/truetype/
#TODO: put validation if folder already exists
sudo mkdir ttf-monaco