Skip to content

Instantly share code, notes, and snippets.

View junihh's full-sized avatar

Junior Hernandez junihh

View GitHub Profile
@mcmoe
mcmoe / lit-element-in-browser.html
Created March 19, 2021 07:57
Using Lit Element without npm directly in the browser
<!-- From: https://gist.githubusercontent.com/sorvell/48f4b7be35c8748e8f6db5c66d36ee29/raw/67346e4e8bc4c81d5a7968d18f0a6a8bc00d792e/index.html -->
<!doctype html>
<html>
<head>
<!-- Polyfills only needed for Firefox and Edge. -->
<script src="https://unpkg.com/@webcomponents/webcomponentsjs@latest/webcomponents-loader.js"></script>
</head>
<body>
<!-- Works only on browsers that support Javascript modules like
Chrome, Safari, Firefox 60, Edge 17 -->
@danielstgt
danielstgt / imagick3.4.4-PHP7.4-forge.sh
Last active April 19, 2024 11:33
Install ImageMagick / Imagick 3.4.4 on PHP 7.4 server (Laravel Forge)
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
apt-get install pkg-config libmagickwand-dev -y
cd /tmp
wget https://pecl.php.net/get/imagick-3.4.4.tgz
tar xvzf imagick-3.4.4.tgz
@wesbos
wesbos / tab-trigger.js
Created November 16, 2015 19:33
How to properly get a TAB trigger working with Emmet inside of JSX
{
"keys": ["tab"],
"command": "expand_abbreviation_by_tab",
// put comma-separated syntax selectors for which
// you want to expandEmmet abbreviations into "operand" key
// instead of SCOPE_SELECTOR.
// Examples: source.js, text.html - source
"context": [
{
@ianaya89
ianaya89 / favicons.html
Last active October 13, 2024 01:36
All Favicons for All Devices and Sizes
<link rel="shortcut icon" sizes="16x16 24x24 32x32 48x48 64x64" href="favicon.ico">
<!-- Mobile (Android, iOS & others) -->
<link rel="apple-touch-icon" sizes="57x57" href="favicon-57.png">
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="favicon-57.png">
<link rel="apple-touch-icon" sizes="72x72" href="favicon-72.png">
<link rel="apple-touch-icon" sizes="114x114" href="favicon-114.png">
<link rel="apple-touch-icon" sizes="120x120" href="favicon-120.png">
<link rel="apple-touch-icon" sizes="144x144" href="favicon-144.png">
<link rel="apple-touch-icon" sizes="152x152" href="favicon-152.png">
@sigilioso
sigilioso / cuter.py
Created June 19, 2012 22:58
Python PIL Example: get a thumbnail by resizing and cropping an image.
# -*- coding: utf-8 -*-
import Image
def resize_and_crop(img_path, modified_path, size, crop_type='top'):
"""
Resize and crop an image to fit the specified size.
args:
img_path: path for the image to resize.