Skip to content

Instantly share code, notes, and snippets.

View carlosmolano's full-sized avatar
🇨🇴
Focusing

Carlos A. Molano carlosmolano

🇨🇴
Focusing
View GitHub Profile
.rounded-corners-gradient-borders {
width: 300px;
height: 80px;
border: double 4px transparent;
border-radius: 80px;
background-image: linear-gradient(white, white), radial-gradient(circle at top left, #f00,#3020ff);
background-origin: border-box;
background-clip: padding-box, border-box;
}
@carlosmolano
carlosmolano / pdf2img.html
Created April 21, 2023 05:27 — forked from imolorhe/pdf2img.html
pdf to image using pdf.js
<html>
<body>
<script type="text/javascript" src="//mozilla.github.io/pdf.js/build/pdf.js"></script>
<script type="text/javascript">
var url = "https://docs.google.com/document/export?format=pdf&id=1ML11ZyyMpnAr6clIAwWrXD53pQgNR-DppMYwt9XvE6s&token=AC4w5Vg7fSWH1Hq0SgNckx4YCvnGPaScyw%3A1423618416864";
var pages = [], heights = [], width = 0, height = 0, currentPage = 1;
var scale = 1.5;
function draw() {
@carlosmolano
carlosmolano / postgres.md
Created May 17, 2022 20:09 — forked from phortuin/postgres.md
Set up postgres + database on MacOS (M1)

Based on this blogpost.

Install with Homebrew:

$ brew install postgresql

Run server:

@carlosmolano
carlosmolano / gist:2e10443f4d5e49c757ed5f0f7a8bd0c6
Created February 14, 2022 18:59 — forked from ratulcse10/gist:ee71916d3b2223234fed50e0c3171f33
create symfony process in laravel project
use Symfony\Component\Process\Process;
Route::get('test',function(){
$process = new Process('sudo apt-get update');
$process->run();
// executes after the command finishes
if (!$process->isSuccessful()) {
throw new ProcessFailedException($process);
}
using UnityEngine;
using UnityEngine.EventSystems;
public class UIZoomImage : MonoBehaviour, IScrollHandler
{
private Vector3 initialScale;
[SerializeField]
private float zoomSpeed = 0.1f;
[SerializeField]

Quick Start

sudo curl https://gist.githubusercontent.com/carlosmolano/54f115164d7ed0a7c3ec5f2c70482b41/raw/soffice.sh > /usr/local/bin/libreoffice && sudo chmod +x /usr/local/bin/libreoffice

Create an bash script at /usr/local/bin/soffice with following content

#!/bin/bash

# Need to do this because symlink won't work

Install Supervisor with sudo apt-get install supervisor in Unix or brew install supervisor in Mac OSX. Ensure it's started with sudo service supervisor restart in Unix or brew services start supervisor in Mac OSX.

In Unix in /etc/supervisord/conf.d/ create a .conf file. In this example, laravel_queue.conf (contents below). Give it execute permissions: chmod +x laravel_queue.conf.

In Mac OSX first run supervisord -c /usr/local/etc/supervisord.ini and in /usr/local/etc/supervisor.d/ create a .conf file. In this example, laravel_queue.conf (contents below). Give it execute permissions: chmod +x laravel_queue.conf.

This file points at /usr/local/bin/run_queue.sh, so create that file there. Give this execute permissions, too: chmod +x run_queue.sh.

Now update Supervisor with: sudo supervisorctl reread in Unix and with: brew services restart supervisor in MAc OSX . And start using those changes with: sudo supervisorctl update.

@carlosmolano
carlosmolano / .gitignore
Created September 13, 2021 13:54 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@carlosmolano
carlosmolano / mac-setup-redis.md
Created August 19, 2021 20:09 — forked from tomysmile/mac-setup-redis.md
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
@carlosmolano
carlosmolano / dependencies
Created July 14, 2021 04:57 — forked from alesanabriav7/dependencies
Configuracion de la navegación
npm install @react-navigation/native @react-navigation/stack
npm install react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context @react-native-community/masked-view