Skip to content

Instantly share code, notes, and snippets.

View lumenpink's full-sized avatar
🏠
Starting a fresh project

Lumen Lohn lumenpink

🏠
Starting a fresh project
View GitHub Profile
@lumenpink
lumenpink / upload-a-file.MD
Created July 7, 2020 17:38 — forked from ahmadawais/upload-a-file.MD
Upload a file using the WordPress REST API

Upload files

Using the REST API to upload a file to WordPress is quite simple. All you need is to send the file in a POST-Request to the wp/v2/media route.

There are two ways of sending a file. The first method simply sends the file in the body of the request. The following PHP script shows the basic principle:

@lumenpink
lumenpink / Pizza Recipe.md
Created July 6, 2020 11:11 — forked from syxanash/Pizza Recipe.md
My Pizza Recipe

Pizza Recipe

pizza recipe

Hi I'm Simone! This recipe was developed based on some tips I acquired over time from lots and lots of resources and tutorials like youtube videos, family and friends recipes. I'm just an amateur who likes making pizza :)

If you plan to perfectionate your pizza making skills, I suggest to come up with your own recipe and research online watching lots of tutorials and different techniques. For now the following recipe is the one that works for me!

(I'm not a professional pizzaiolo and I never had any sort of experience in a professional pizzeria restaurant)

Ingredients and quantities

@lumenpink
lumenpink / webmention.php
Created April 19, 2020 13:59 — forked from adactio/webmention.php
Minimum viable webmention in PHP.
<?php
# Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
# http://creativecommons.org/publicdomain/zero/1.0/
if (!isset($_POST['source']) || !isset($_POST['target'])) {
header($_SERVER['SERVER_PROTOCOL'] . ' 400 Bad Request');
exit;
}

Keybase proof

I hereby claim:

  • I am lohn on github.
  • I am lohn (https://keybase.io/lohn) on keybase.
  • I have a public key ASAOKxfo84F9cFUP604WZ-HKcW1UIQqTmxUiIxSYPHOhGgo

To claim this, I am signing this object:

@lumenpink
lumenpink / nginx-rtmp.md
Created June 14, 2019 19:26 — forked from deedos/nginx-rtmp.md
Instalação e configuração de nginx-rtmp module e ffmpeg para transcoding

Instalação e Configuração de nginx-rtmp com live transcoding - S.O : Debian SID stable

  • Instalar ffmpeg da fonte: https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu

  • Instalar nginx com módulo rtmp

      wget http://nginx.org/download/nginx-1.9.3.tar.gz
      git clone https://github.com/arut/nginx-rtmp-module
      wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.bz2
      tar -xvf pcre-8.36.tar.bz2
      tar -xvf nginx-1.9.3.tar.gz
      cd nginx-1.9.3
    
@lumenpink
lumenpink / gist:76d9e2195ecb6822c366a276b4bc1f3f
Created June 6, 2019 00:29
SQL to add an admin user to Wordpress
INSERT INTO `wordpress`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('58', 'admin', MD5('password'), 'Your Name', '[email protected]', 'https://yoursite.com/', '2011-06-07 00:00:00', '', '0', 'Your Name');
INSERT INTO `wordpress`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '58', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');
INSERT INTO `wordpress`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '58', 'wp_user_level', '10');
#!/bin/bash
sudo yum update -y
sudo amazon-linux-extras install docker
sudo service docker start
sudo usermod -a -G docker ec2-user
sudo yum -y install autoconf automake gcc gcc-c++ make boost-devel zlib-devel ncurses-devel protobuf-devel openssl-devel
cd /usr/local/src
sudo wget http://mosh.mit.edu/mosh-1.2.4.tar.gz
sudo tar xvf mosh-1.2.4.tar.gz
cd mosh-1.2.4
@lumenpink
lumenpink / iconv.docker
Created May 27, 2019 06:36 — forked from tristanlins/iconv.docker
Docker PHP extension recipes
FROM php:5.6-cli
RUN apt-get update \
&& apt-get install -y \
libfreetype6-dev \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-install iconv \
&& apt-get remove -y \
libfreetype6-dev \
&& apt-get install -y \
@lumenpink
lumenpink / Install.ps1
Last active May 21, 2019 18:49
Installed Packages
Set-ExecutionPolicy RemoteSigned -scope CurrentUser -Force
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
Set-ExecutionPolicy Bypass -Scope CurrentUser -Force
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco feature enable -n allowGlobalConfirmation
choco install git vlc screentogif teamviewer adb cmder notepadplusplus googlechrome Firefox gimp inkscape 7zip cutepdf adobereader php composer dia DotNet4.5.1 DotNet4.5.2 DotNet4.6.1 dotnet4.7.1 dotnetfx handbrake heidisql hosts.editor imageglass mobaxterm ngrok php python2 qbittorrent rsync vcredist140 vscode-insiders Wget sshfs nodejs-lts nvm golang
scoop install hadolint shfmt
npm -g i npm yarn @feathersjs/cli @quasar/cli @vue/cli bash-language-server jshint eslint
@lumenpink
lumenpink / WebSocketController.php
Created May 12, 2019 02:07 — forked from Mevrael/WebSocketController.php
Laravel + WebSocket (Ratchet/ReactPHP) integration
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Cookie;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Session;
use Ratchet\WebSocket\Version\RFC6455\Connection;