Skip to content

Instantly share code, notes, and snippets.

View alexagui's full-sized avatar

Alex Aguilar alexagui

View GitHub Profile
@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
@danielstgt
danielstgt / imagick3.4.3-PHP7.3-forge.sh
Last active May 30, 2023 22:43 — forked from rostockahoi/imagick3.4.3-PHP7.2-forge.sh
Install Imagick 3.4.3 on PHP 7.3 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.3.tgz
tar xvzf imagick-3.4.3.tgz
@Harry-Harrison
Harry-Harrison / countries.json
Last active December 3, 2020 15:27
Freeform Craft select field for countries of Earth.
[{"label":"Afghanistan", "value":"Afghanistan"},{"label":"Aland Islands", "value":"Aland Islands"},{"label":"Albania", "value":"Albania"},{"label":"Algeria", "value":"Algeria"},{"label":"American Samoa", "value":"American Samoa"},{"label":"Andorra", "value":"Andorra"},{"label":"Angola", "value":"Angola"},{"label":"Anguilla", "value":"Anguilla"},{"label":"Antarctica", "value":"Antarctica"},{"label":"Antigua and Barbuda", "value":"Antigua and Barbuda"},{"label":"Argentina", "value":"Argentina"},{"label":"Armenia", "value":"Armenia"},{"label":"Aruba", "value":"Aruba"},{"label":"Australia", "value":"Australia"},{"label":"Austria", "value":"Austria"},{"label":"Azerbaijan", "value":"Azerbaijan"},{"label":"Bahamas", "value":"Bahamas"},{"label":"Bahrain", "value":"Bahrain"},{"label":"Bangladesh", "value":"Bangladesh"},{"label":"Barbados", "value":"Barbados"},{"label":"Belarus", "value":"Belarus"},{"label":"Belgium", "value":"Belgium"},{"label":"Belize", "value":"Belize"},{"label":"Benin", "value":"Benin"},{"label":"B
@iamphilrae
iamphilrae / phpMyAdmin Export Filename Template, Including Date and Time
Last active April 3, 2024 20:30
phpMyAdmin Export Filename Template, Including Date and Time
@DATABASE@__%Y-%m-%d_%H-%M-%S
https://streamacon.com/video/laracon-us/taylor-otwell-laravel-53-overview
https://streamacon.com/video/laracon-us/adam-wathan-test-driven-laravel
https://streamacon.com/video/laracon-us/chris-fidao-servers-for-hackers.
https://streamacon.com/video/laracon-us/evan-you-vuejs-workshop
https://streamacon.com/video/laracon-us/evan-you-vue-router-and-vuex
https://streamacon.com/video/laracon-us/jack-mcdade-wizards-lawnmowers-and-hovercrafts
https://streamacon.com/video/laracon-us/sentry-product-demo
https://streamacon.com/video/laracon-us/ben-ramsey-long-live-http2
https://streamacon.com/video/laracon-us/zeev-suraski-php-7
https://streamacon.com/video/laracon-us/amanda-folson-apis-with-lumen
@aaronwaldon
aaronwaldon / 1) readme.md
Last active March 24, 2023 14:25
How to set up Gulp for Craft CMS. Includes SASS compilation and minification, JavaScript minification, livereloading, and browser sync.

How to set up Gulp with a Craft CMS project

I freaking love working with technologies like Gulp, and wanted to share how to get my current Craft front-end workflow set up. With a few tweaks, this can also be used with virtually any other sites (I've used it with Laravel, static sites, ExpressionEngine, etc).

Project Directory Structure

  • project root/
    • craft/
      • templates/
  • (your craft template files)
@cmalven
cmalven / craft-localization-nginx
Last active October 22, 2019 12:59
nginx config for Craft CMS localization
server {
listen 80;
server_name site.production.designcompany.com;
root /home/forge/site.production.designcompany.com/public;
# enable gzip compression
gzip on;
gzip_min_length 1100;
gzip_buffers 4 32k;
gzip_types text/plain application/x-javascript image/svg+xml text/xml text/css;
# sets the proxy cache path location, max size 2g
proxy_cache_path /data/nginx/cache levels=1:2 keys_zone=STATIC:100m inactive=24h max_size=2g;
# transfers the `Host` header to the backend
proxy_set_header Host $host;
# uses the defined STATIC cache zone
proxy_cache STATIC;
# cache 200 10 minutes, 404 1 minute, others status codes not cached

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/