Skip to content

Instantly share code, notes, and snippets.

View edux's full-sized avatar
🏠
Working from home

Eduardo Casarero edux

🏠
Working from home
  • Percona
  • Buenos Aires, Argentina
View GitHub Profile
@johngrimes
johngrimes / macos-10133-fail.md
Last active February 5, 2021 19:39
macOS 10.13.3 Update FAIL

I had some massive problems when installing the 10.13.3 update on macOS. The update installed, my computer successfully restarted - but on a subsequent restart the boot failed and displayed the following installation log:

Apr  4 04:07:04 MacBook-Pro opendirectoryd[186]: [session] Processing a network change notification
Apr  4 04:07:06 MacBook-Pro Unknown[526]: Launching the Language Chooser for an OS Install
Apr  4 04:07:06 MacBook-Pro bspowerassertiontool[521]: Tool exited successfully (0).
Apr  4 04:07:06 MacBook-Pro launchprogresswindow[524]: ISAP: Show progress UI called
Apr  4 04:07:07 MacBook-Pro Installer Progress[180]: Progress UI App Starting
Apr  4 04:07:32 MacBook-Pro opendirectoryd[186]: [session] Received a network change notification
Apr  4 04:07:32 MacBook-Pro opendirectoryd[186]: [session] Received a network change notification
@joewiz
joewiz / post-mortem.md
Last active September 3, 2023 11:57
Recovery from nginx "Too many open files" error on Amazon AWS Linux

On Tue Oct 27, 2015, history.state.gov began buckling under load, intermittently issuing 500 errors. Nginx's error log was sprinkled with the following errors:

2015/10/27 21:48:36 [crit] 2475#0: accept4() failed (24: Too many open files)

2015/10/27 21:48:36 [alert] 2475#0: *7163915 socket() failed (24: Too many open files) while connecting to upstream...

An article at http://www.cyberciti.biz/faq/linux-unix-nginx-too-many-open-files/ provided directions that mostly worked. Below are the steps we followed. The steps that diverged from the article's directions are marked with an *.

  1. * Instead of using su to run ulimit on the nginx account, use ps aux | grep nginx to locate nginx's process IDs. Then query each process's file handle limits using cat /proc/pid/limits (where pid is the process id retrieved from ps). (Note: sudo may be necessary on your system for the cat command here, depending on your system.)
  2. Added fs.file-max = 70000 to /etc/sysctl.conf
@grugq
grugq / gist:03167bed45e774551155
Last active April 6, 2024 10:12
operational pgp - draft

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.

@mgaitan
mgaitan / carrefour.csv
Last active December 2, 2022 12:39
sucursales carrefour
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 12 columns, instead of 9. in line 7.
nombre,cadena_nombre,cadena_id,direccion,ciudad,ciudad_relacionada_id,provincia,lon,lat,telefono,url,horarios
Sucursal 48 - RÍO GALLEGOS,Carrefour hiper,7,Paseo de los Arrieros 1098,Río Gallegos,2173,Santa Cruz,-69.246833,-51.627467,(0296) 6442654,,
Sucursal 143 - RÍO GALLEGOS,Carrefour market,13,Av. Dr. Néstor Kirchner 742,Río Gallegos,2173,Santa Cruz,-69.212844,-51.622458,(0296) 642 3907,,
Sucursal 180 - RIO GRANDE,Carrefour hiper,7,Perú 76,Rio Grande,2172,Tierra del Fuego,-67.72151,-53.773761,(0296) 442 1035,,
Sucursal 142 - RÍO GRANDE,Carrefour hiper,7,Avenida San Martín 685,Río Grande,2172,Tierra del Fuego,-67.70308,-53.785070,(0296) 443 2650,,
Sucursal 161 - USHUAIA,Carrefour hiper,7,12 de Octubre 169,Ushuaia,1591,Tierra del Fuego,-68.32587,-54.814825,(0290) 143 7565,,
Sucursal 63 - CALETA OLIVIA,Carrefour hiper,7,Avenida Tierra del Fuego 856,Caleta Olivia,5033,Santa Cruz,-67.53482,-46.444977,0800-444-8484,,
Sucursal 292 - COMODORO RIVADAVIA,Carrefour hiper,7,( Textil ),Polonia 1540,4572,Av.,-67.535559,
@kevingessner
kevingessner / gist:9509148
Last active April 27, 2023 15:45
Responsive emails that really work -- From Etsy's Code As Craft blog: http://codeascraft.com/2014/03/13/responsive-emails-that-really-work
<html>
<head>
<style type="text/css">
table table {
width: 600px !important;
}
table div + div { /* main content */
width: 65%;
float: left;
}
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 2, 2024 05:55
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@dave1010
dave1010 / htaccess
Created December 14, 2011 13:07
HTTP Status Cats Apache (htaccess) config
# HTTP Status Cats
# Apache (htaccess) config created by @dave1010
# Licensed CC BY 2.0
# Images CC BY 2.0, from GirlieMac's photostream:
# http://www.flickr.com/photos/girliemac/sets/72157628409467125/with/6508023065/
# Usage: copy save this file as .htaccess or add it to your httpd.conf
ErrorDocument 404 '<a href="http://www.flickr.com/photos/girliemac/6508022985/" title="404 - Not Found by GirlieMac, on Flickr"><img src="http://farm8.staticflickr.com/7172/6508022985_b22200ced0.jpg" width="500" height="400" alt="404 - Not Found"></a>'
@mhawksey
mhawksey / gist:1276293
Last active October 23, 2023 09:00
Google App Script to insert data to a google spreadsheet via POST or GET - updated version as per https://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/
/*
Copyright 2011 Martin Hawksey
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software