Skip to content

Instantly share code, notes, and snippets.

View mauricios's full-sized avatar
🎯
Focusing

Mauricio Sánchez mauricios

🎯
Focusing
View GitHub Profile
@mauricios
mauricios / curl_time_format.txt
Last active February 17, 2022 18:21
CURL format file to summarize loading times results of a page
Content Type: %{content_type}\n
HTTP Code: %{http_code}\n
HTTP Connect: %{http_connect}\n
Number Connects: %{num_connects}\n
Number Redirects: %{num_redirects}\n
Redirect URL: %{redirect_url}\n
Size Download: %{size_download}\n
Average speed download: %{speed_download}\n
Size Upload: %{size_upload}\n
SSL Verify: %{ssl_verify_result}\n
@kevin-smets
kevin-smets / 1_kubernetes_on_macOS.md
Last active January 6, 2024 22:04
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

@dfritschy
dfritschy / CrossDomainRouter.php
Last active October 25, 2022 20:52
CrossDomainRouter for eZ PlatformIn a multi-site setup, there are usually different domains mapped to different branches in the content tree. In such a use case you will frequently find the need to share content across different siteaccesses.This is no problem with multiple locations, but when generating an URL Alias to a (main) location in anot…
<?php
namespace Webmanufaktur\MySite\Routing;
use eZ\Publish\API\Repository\Values\Content\Location;
use eZ\Publish\Core\MVC\ConfigResolverInterface;
use eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator;
use eZ\Publish\Core\SignalSlot\Repository;
use Symfony\Cmf\Component\Routing\ChainedRouterInterface;
use Symfony\Component\HttpFoundation\Request;
@shovon
shovon / increase_swap.sh
Created April 10, 2015 15:18
Increasing swap size. Only tested on the ubuntu/trusty64 Vagrant box. CREDIT GOES TO ---> http://jeqo.github.io/blog/devops/vagrant-quickstart/
#!/bin/sh
# size of swapfile in megabytes
swapsize=8000
# does the swap file already exist?
grep -q "swapfile" /etc/fstab
# if not then create it
if [ $? -ne 0 ]; then
@woods
woods / gen-key-script
Last active March 12, 2024 12:00
Creating gpg keys non-interactively
Key-Type: 1
Key-Length: 2048
Subkey-Type: 1
Subkey-Length: 2048
Name-Real: Root Superuser
Name-Email: root@handbook.westarete.com
Expire-Date: 0
@garystafford
garystafford / create_swap.sh
Last active March 5, 2023 22:28
From my blog post, Scripting Linux Swap Space: Scripting Linux Swap Space
#!/bin/sh
# size of swapfile in megabytes
swapsize=512
# does the swap file already exist?
grep -q "swapfile" /etc/fstab
# if not then create it
if [ $? -ne 0 ]; then
@zenorocha
zenorocha / .hyper.js
Last active November 12, 2023 15:13 — forked from millermedeiros/osx_setup.md
Setup macOS Sierra (10.12)
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 14,
// font family with optional fallbacks

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

@Mins
Mins / mysql_secure.sh
Last active February 16, 2024 00:03
Automating mysql_secure_installation
#!/bin/bash
aptitude -y install expect
// Not required in actual script
MYSQL_ROOT_PASSWORD=abcd1234
SECURE_MYSQL=$(expect -c "
set timeout 10