Skip to content

Instantly share code, notes, and snippets.

View luisalonsobr's full-sized avatar
🎯
Focusing

Luis Alonso luisalonsobr

🎯
Focusing
View GitHub Profile
@luisalonsobr
luisalonsobr / runpod xformers.txt
Created April 29, 2023 17:28 — forked from FurkanGozukara/runpod xformers.txt
How to run and install Automatic1111 Web UI and DreamBooth on RunPod with latest xformers
video of this gist : https://youtu.be/zA4LksIVas8
dreambooth extension commit id : 3324b6ab7fa661cf7d6b5ef186227dc5e8ad1878
sd web ui commit : 22bcc7be428c94e9408f589966c2040187245d81
fuser -k 3000/tcp
python relauncher.py
/// GET ROUTE SUB DOMAIN
Request::macro('subdomain', function () {
return current(explode('.', $this->getHost()));
});
$request->subdomain()
///////
@luisalonsobr
luisalonsobr / Encryption.js
Created October 7, 2020 15:23 — forked from ve3/Encryption.js
Encrypt and decrypt between programming languages (PHP & JavaScript).
/**
* Encryption class for encrypt/decrypt that works between programming languages.
*
* @author Vee Winch.
* @link https://stackoverflow.com/questions/41222162/encrypt-in-php-openssl-and-decrypt-in-javascript-cryptojs Reference.
* @link https://github.com/brix/crypto-js/releases crypto-js.js can be download from here.
*/
class Encryption {
@luisalonsobr
luisalonsobr / paisesPortuguesIngles.sql
Created October 7, 2020 14:21 — forked from thiagosilr/paisesPortuguesIngles.sql
Tabela MYSQL com o nome de todos os países em Português / Inglês
--
-- Estrutura da tabela `pais`
--
CREATE TABLE IF NOT EXISTS `pais` (
`paisId` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`paisNome` varchar(50) NOT NULL,
`paisName` varchar(50) NOT NULL,
PRIMARY KEY (`paisId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=253 ;
@luisalonsobr
luisalonsobr / gistlog.yml
Created August 10, 2020 14:52 — forked from askilondz/gistlog.yml
Adaptive Streaming with MPEG-DASH and HLS using AWS

Adaptive Streaming has become the neccessity for streaming video and audio. Unfortantely, as of this post, there isn't a whole lot of tutorials that accumulate all of the steps to get this working. Hopefully this post achieves that. This post focuses on using Amazon Web Services (AWS) to transcode for HLS and DASH and be the Content Delivery Network (CDN) that delivers the stream to your web page. We'll be using Video.js for the HTML5 player as well as javascript support libaries to make Video.js work with HLS and DASH.

So Here's what you need:

Set up three S3 buckets

@luisalonsobr
luisalonsobr / setting-up-lamp-ec2.md
Created July 14, 2020 00:24 — forked from keithweaver/setting-up-lamp-ec2.md
Setting up a LAMP stack on Amazon Web Services (AWS) EC2

Setting Up EC2

  1. Sign into AWS
  2. Open EC2
  3. Click Instances on Left Side
  4. Click "Launch Instance"
  5. Select "Amazon Linux AMI 2016.09.1 (HVM), SSD Volume Type"
  6. Select Free Tier
  7. Click review and launch
  8. Press Launch
@luisalonsobr
luisalonsobr / dumprequest.php
Created October 4, 2019 17:12 — forked from magnetikonline/dumprequest.php
PHP script to dump full HTTP request to file (method, HTTP headers and body).
<?php
// https://gist.github.com/magnetikonline/650e30e485c0f91f2f40
class DumpHTTPRequestToFile {
public function execute($targetFile) {
$data = sprintf(
"%s %s %s\n\nHTTP headers:\n",
$_SERVER['REQUEST_METHOD'],
@luisalonsobr
luisalonsobr / PHP Countries Array
Last active April 10, 2019 19:40 — forked from DHS/PHP Countries Array
PHP array of all country names
<?php
$countries = array("Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Island