Skip to content

Instantly share code, notes, and snippets.

@Sellyme
Sellyme / AStats completed filter.user.js
Last active Jan 24, 2019
Removes all games from AStats Steam_Games.php under a specific filter (by default games that are not owned or started)
View AStats completed filter.user.js
// ==UserScript==
// @name AStats completed filter
// @version 0.3.2
// @description Removes all games from AStats Steam_Games.php that are either owned, or have had at least 1 achievement earned
// @author Sellyme
// @downloadURL https://gist.github.com/Sellyme/1ca4092058480517f7c255c6555bfe24/raw/AStats%2520completed%2520filter.user.js
// @updateURL https://gist.github.com/Sellyme/1ca4092058480517f7c255c6555bfe24/raw/AStats%2520completed%2520filter.user.js
// @match http://astats.astats.nl/astats/Steam_Games.php*
// @match https://astats.astats.nl/astats/Steam_Games.php*
// @run-at document-end
@jakebathman
jakebathman / logslaravel.sh
Created Aug 19, 2018
Tail Laravel logs and filter out the stack traces
View logslaravel.sh
tail -f -n 450 storage/logs/laravel*.log \
| grep -i -E \
"^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" \
--color
@matthewzring
matthewzring / markdown-text-101.md
Last active Jan 18, 2022
A guide to Markdown on Discord.
View markdown-text-101.md

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

Sweet Styles

Italics *italics* or _italics_

Underline italics __*underline italics*__

@nasrulhazim
nasrulhazim / 01.md
Last active May 7, 2021
Laravel Default API Login
View 01.md

Setup

Migration

Create new migration script:

php artisan make:migration add_api_token --table=users
@VinceG
VinceG / Builder.php
Created Oct 19, 2016
Laravel support for replace into / insert ignore / insert on duplicate key update
View Builder.php
<?php
namespace App\Library\Database\Query;
use Illuminate\Database\Query\Builder as QueryBuilder;
class Builder extends QueryBuilder
{
/**
* Insert a new record into the database.
@veganista
veganista / OpenCartValetDriver.php
Created Oct 3, 2016
Laravel Valet Driver - OpenCart 2.x
View OpenCartValetDriver.php
<?php
class OpenCartValetDriver extends ValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active Jan 17, 2022
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)
View letsencrypt_2020.md

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@p3t3r67x0
p3t3r67x0 / pseudo_elements.md
Last active Nov 1, 2021
A CSS pseudo-element is used to style specified parts of an element. In some cases you can style native HTML controls with vendor specific pseudo-elements. Here you will find an list of cross browser specific pseudo-element selectors.
View pseudo_elements.md

Styling native elements

Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element or the /deep/ path selector.

video::webkit-media-controls-timeline {
  background-color: lime;
}

video /deep/ input[type=range] {
@soheilhy
soheilhy / nginxproxy.md
Last active Jan 17, 2022
How to proxy web apps using nginx?
View nginxproxy.md

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@XueshiQiao
XueshiQiao / gource.sh
Last active Nov 10, 2019 — forked from cgoldberg/gource.sh
Generate a MP4 Video for your Git project commits using Gource!
View gource.sh
# 1.install gource using HomeBrew
$ brew install gource
# 2.install avconv
git clone git://git.libav.org/libav.git
cd libav
# it will take 3-5 minutes to complie, be patient.
./configure --disable-yasm
make && make install