Skip to content

Instantly share code, notes, and snippets.

View matheuseduardo's full-sized avatar
:octocat:
coding

Matheus Eduardo matheuseduardo

:octocat:
coding
View GitHub Profile
@aveexy
aveexy / nginx.conf
Last active January 8, 2025 09:29
immich nginx reverse proxy with base url (not a full/complete nginx config) base url is /immich (if you want something other, replace "/immich" with other path
pid /run/nginx/nginx.pid;
error_log stderr;
daemon off;
events {
}
http {
proxy_cache_path /var/cache/nginx/immich_revprox keys_zone=immich_revprox:10m levels=1:2 use_temp_path=off inactive=1d max_size=1g;
server {
listen 0.0.0.0:443 ssl ;
@backerman
backerman / profile-snippet-sshargcomplete.ps1
Last active March 4, 2025 22:45
Enable tab completion for ssh hostnames in PowerShell
using namespace System.Management.Automation
Register-ArgumentCompleter -CommandName ssh,scp,sftp -Native -ScriptBlock {
param($wordToComplete, $commandAst, $cursorPosition)
$knownHosts = Get-Content ${Env:HOMEPATH}\.ssh\known_hosts `
| ForEach-Object { ([string]$_).Split(' ')[0] } `
| ForEach-Object { $_.Split(',') } `
| Sort-Object -Unique
# For now just assume it's a hostname.
@dashed
dashed / nyan.gif
Last active March 18, 2025 03:02
🏳️‍🌈🐱 nyan cat
nyan.gif
@fanjin-z
fanjin-z / csgo-server-guide.md
Last active September 22, 2024 01:27
Complete Guide for Hosting CS:GO Dedicated Servers

Complete Guide for Hosting a CS:GO Dedicated Server

Creative Commons License.

I tested the setup on Debian Stretch (naive installation) and Jessie (LinuxGSM installation). The setup should work on Debian 8 (Jessie), Debian 9 (Stretch) and Ubuntu (16.04). However, If you're running on Windows or other non-debian based Linux OS (e.g. CentOS, openSUSE), this guide doesn't apply to you.

My Servers:

I'm hosting FFA warm-up and HvH(soon) servers in San Francisco, welcome to join by:

IPv4: 159.89.154.137   
Ipv6: 2604:a880:2:d0::20ad:2001 
@virolea
virolea / upload.js
Last active December 12, 2024 16:14
Tracking file upload progress using axios
upload(files) {
const config = {
onUploadProgress: function(progressEvent) {
var percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total)
console.log(percentCompleted)
}
}
let data = new FormData()
data.append('file', files[0])
@Ovsyanka
Ovsyanka / ruleset.xml
Last active February 20, 2020 11:10 — forked from gsherwood/ruleset.xml
PSR2 with tabs instead of spaces and bracers on the end of lines
<?xml version="1.0"?>
<ruleset name="MyStandard">
<description>
PSR2 with changes:
* tabs instead of spaces (https://gist.github.com/gsherwood/9d22f634c57f990a7c64)
* bracers on end of line instead new line
</description>
<!-- tabs -->
<arg name="tab-width" value="4"/>
@nissicreative
nissicreative / dreamhost-php.md
Last active September 1, 2020 14:05
Update PHP and install Composer on DreamHost

DreamHost PHP

Make PHP 7 default binary for CLI

ssh <server>
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="Symfony2">
<!-- There should not be any code in the bundle Resources directory. -->
<exclude-pattern>*/Resources/*</exclude-pattern>
<rule ref="Generic.Classes.DuplicateClassName.Found"><severity>0</severity></rule>
<rule ref="Generic.CodeAnalysis.EmptyStatement.NotAllowed"><severity>2</severity></rule>
<rule ref="Generic.CodeAnalysis.EmptyStatement.NotAllowedWarning"><severity>4</severity></rule>
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop.CanSimplify"><severity>4</severity></rule>
<rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed"><severity>2</severity></rule>
<rule ref="Generic.CodeAnalysis.JumbledIncrementer.Found"><severity>2</severity></rule>
@jkingsman
jkingsman / shrug.js
Last active August 26, 2019 14:56
Shrug Emoji Bookmarklet
javascript:(function(){document.activeElement.value=document.activeElement.value+'¯\\_(ツ)_/¯';})();
/**
*
* Gulpfile setup
*
* @since 1.0.0
* @authors Ahmad Awais, @digisavvy, @desaiuditd, @jb510, @dmassiani and @Maxlopez
* @package neat
* @forks _s & some-like-it-neat
*/