Skip to content

Instantly share code, notes, and snippets.

@uxweb
uxweb / ffmpeg cheatsheet for glitching
Created July 27, 2021 18:07 — forked from NeuroWinter/ffmpeg cheatsheet for glitching
ffmpeg cheatsheet for glitching
FFMPEG '-i', file, '-c:v', 'libopenjpeg', "jpeg2000\\" + name + ".jp2"\
Convert image to jpeg2000
ffmpeg -i in.png -c:v libopenjpeg out.jp2
Hex Edit out.jp2
ffmpeg -i in.jp2 -c:v png out.png
General Edit
ffmpeg -i input.avi -c:v mpeg2video -g 999 -q:v 1 output.avi
*edit in avidemux/whatever*
@uxweb
uxweb / .gitlab-ci.yml
Last active April 14, 2024 15:08
Laravel application build and deployment with GitLab CI
image: docker:19.03
services:
- name: docker:19.03-dind
variables:
# ENABLE DOCKER BUILDKIT
DOCKER_BUILDKIT: 1
DOCKER_TLS_CERTDIR: "/certs"
DOMAIN: futurofficevalencia.es
@uxweb
uxweb / multi-cloud-docker-swarm.md
Created August 26, 2020 01:09 — forked from jesugmz/multi-cloud-docker-swarm.md
Create a simple multi cloud Docker cluster using Docker Swarm, Docker Machine and the three top cloud providers nowadays - Google Compute Engine, Microsoft Azure and AWS

Simple multi cloud Docker cluster using Docker Swarm

This guide explains how to create a simple multi cloud Docker cluster using Docker Swarm, Docker Machine and the three top cloud providers nowadays - Google Compute Engine, Microsoft Azure and AWS.

Prerequisites

This guide assumes you have a Linux host with Docker CE installed. If you are using Docker for Mac or Docker for Windows you can avoid the Docker Machine set up since it comes included.

Install Docker Machine

@uxweb
uxweb / dev.json
Created July 4, 2020 14:18 — forked from edgrosvenor/dev.json
Experimenting with wikimedia/composer-merge-plugin
{
"require": {
"grosv/eloquent-sheets": "dev-main",
"grosv/laravel-passwordless-login": "dev-main",
"wikimedia/composer-merge-plugin": "^1.4"
},
"require-dev": {
"grosv/laravel-git-workflow": "dev-main",
"grosv/stubby": "dev-main"
},
@uxweb
uxweb / launch.json
Created June 23, 2020 14:09
VScode Xdebug Settings
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
@uxweb
uxweb / HasUuid.php
Created July 12, 2018 18:23 — forked from calebporzio/HasUuid.php
A little trait to add to models that will have Uuids
<?php
// Example usage in a model:
class ExampleModel extends Model
{
use HasUuid;
protected $primaryKey = 'uuid';
@uxweb
uxweb / launch.json
Created June 22, 2018 21:09
VSCode debug config for Vue.js App
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "vuejs: chrome",
<?php
return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_unsets' => true,
'method_separation' => true,
'no_multiline_whitespace_before_semicolons' => true,
'single_quote' => true,
@uxweb
uxweb / letsencrypt_2017.md
Created October 17, 2017 06:48 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

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

There are two main modes to run the Let's Encrypt client (called Certbot):

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80).

In the following, we're setting up mydomain.com. HTML is served from /var/www/mydomain, and challenges are served from /var/www/letsencrypt.

@uxweb
uxweb / php-method.sublime-snippet
Created February 17, 2017 16:19
Sublime Text PHP Class Method Snippets
<snippet>
<content><![CDATA[
public function ${1}()
{
${2}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>met</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->