Skip to content

Instantly share code, notes, and snippets.

View mmolucio's full-sized avatar
🎯
Focusing

Guillermo Lucio mmolucio

🎯
Focusing
View GitHub Profile
@segg21
segg21 / Skins.json
Last active March 8, 2023 07:53
300+ Rust Skins Per Item for Skins Plugin (Non Accepted Skins)
{
"Command": "skin",
"Skins": [
{
"Item Shortname": "fun.guitar",
"Skins": [
1287805625,
814874910,
1186248895,
1196457681,
@stewartadam
stewartadam / main.py
Last active September 9, 2024 12:41 — forked from gear11/main.py
Simple Python proxy server based on Flask and Requests with support for GET and POST requests.
"""
A simple proxy server, based on original by gear11:
https://gist.github.com/gear11/8006132
Modified from original to support both GET and POST, status code passthrough, header and form data passthrough.
Usage: http://hostname:port/p/(URL to be proxied, minus protocol)
For example: http://localhost:5000/p/www.google.com
"""
import re
@roxlu
roxlu / JanusRecorder.js
Last active November 3, 2021 20:19
Created this code while debuggging an issue where Janus only records a video of 8 bytes. Janus log: https://gist.github.com/roxlu/08f32169122dd23e132af7abfb37f928 You can clone this into a vhost; the test html contains a working version that allows you to create multiple video recordings w/o interruptions.
/*
---------------------------------------------------------------------------------
oooo
`888
oooo d8b .ooooo. oooo ooo 888 oooo oooo
`888""8P d88' `88b `88b..8P' 888 `888 `888
888 888 888 Y888' 888 888 888
888 888 888 .o8"'88b 888 888 888
@rynaldos-zz
rynaldos-zz / wc-min-pass-chars-req.php
Last active October 31, 2020 12:24
[WooCommerce 3.0] Require minimum password length for account registration, password update, and password resets
add_action('woocommerce_process_registration_errors', 'validatePasswordReg', 10, 2 );
function validatePasswordReg( $errors, $user ) {
// change value here to set minimum required password chars
if(strlen($_POST['password']) < 15 ) {
$errors->add( 'woocommerce_password_error', __( 'Password must be at least 15 characters long.' ) );
}
// adding ability to set maximum allowed password chars -- uncomment the following two (2) lines to enable that
//elseif (strlen($_POST['password']) > 16 )
//$errors->add( 'woocommerce_password_error', __( 'Password must be shorter than 16 characters.' ) );
@noelboss
noelboss / git-deployment.md
Last active September 4, 2024 16:25
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active September 7, 2024 14:29
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

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:

@lopspower
lopspower / README.md
Last active September 19, 2024 22:32
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@rafaelverger
rafaelverger / takess.js
Last active February 11, 2020 18:27
Taking screenshot of full document body using html2canvas and uploading to cloudinary
function takeSS(cloudinary_name, cloudinary_key, cloudinary_unsigned_preset, main_element){
main_element = main_element || document.body;
const imageUrlToBase64 = (url) => fetch(
`https://get-base64-image.rafaelverger.now.sh/?url=${encodeURIComponent(url)}`
).then(res => res.text());
const _takeSS = () => {
const elementImages = [].slice.call(
main_element.querySelectorAll('img'), 0
).filter(img => /^http/.test(img.src));
@karlkranich
karlkranich / apitest.php
Last active July 17, 2018 14:49
Updated PHP code to use the Google Sheets API. See usage instructions at http://karl.kranich.org/2015/04/16/google-sheets-api-php/ More examples at https://gist.github.com/karlkranich/afa39e3d778455b38c38
<?php
// apitest.php
// by Karl Kranich - karl.kranich.org
// version 3.1 - edited query section
require_once realpath(dirname(__FILE__) . '/vendor/autoload.php');
include_once "google-api-php-client/examples/templates/base.php";
$client = new Google_Client();
@ssherar
ssherar / UIColorFromRGB.swift
Last active April 18, 2017 21:05
UIColorFromRGB - adapted from http://stackoverflow.com/a/12397366 for Swift
/**
Returns a UIColor object from a Hexadecimal string with a solid colour
i.e.
UIColorFromRGB("#FF0000") == UIColor.redColor()
UIColorFromRGB("#0000FF") == UIColor.blueColor()
UIColorFromRGB("#GGGGGG") == UIColor.blackColor()
UIColorFromRGB("#Hello") == UIColor.blackColor()