Skip to content

Instantly share code, notes, and snippets.

View EdgarOrtegaRamirez's full-sized avatar
📝
​Learning!

Edgar Ortega EdgarOrtegaRamirez

📝
​Learning!
View GitHub Profile
@EdgarOrtegaRamirez
EdgarOrtegaRamirez / google-api-deno.ts
Created September 29, 2022 14:00
Google API Deno Example
import { Content as ShoppingAPI, auth } from "https://googleapis.deno.dev/v1/content:v2.1.ts";
const merchantId = BigInt(124123123);
const serviceAccountConfig = await Deno.readTextFile("./service-account.json");
const credentials = auth.fromJSON(JSON.parse(serviceAccountConfig));
const shoppingAPI = new ShoppingAPI(credentials);
const response = await shoppingAPI.productsList(merchantId, {})
console.log(response);
@codingjoe
codingjoe / Procfile
Created January 19, 2021 17:29
Sentry Release on Heroku w/ commits, sourmaps & assets
release: bin/release
web: ...
worker: ...
@EdgarOrtegaRamirez
EdgarOrtegaRamirez / append_gzip.rb
Last active March 3, 2022 18:37
Ruby - Append to a gzip CSV file
require "zlib"
open_mode = "ab" # append / binary
file = File.open('path-to-file.csv.gz', open_mode)
gz = Zlib::GzipWriter.new(file)
gz.write("new,row,csv\n")
gz.close
# http://ruby-doc.org/core-2.5.3/IO.html#method-c-new
! function () {
var require = function (file, cwd) {
var resolved = require.resolve(file, cwd || "/"),
mod = require.modules[resolved];
if (!mod) throw new Error("Failed to resolve module " + file + ", tried " + resolved);
var cached = require.cache[resolved],
res = cached ? cached.exports : mod();
return res
};
require.paths = [], require.modules = {}, require.cache = {}, require.extensions = [".js", ".coffee", ".json"], require._core = {
@robhrt7
robhrt7 / MySQL_5-7_macOS.md
Last active February 28, 2024 03:48 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL 5.7 on macOS using Homebrew

This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).

Install MySQL 5.7 on macOS

This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
@EdgarOrtegaRamirez
EdgarOrtegaRamirez / install.sh
Created July 13, 2018 14:21
Install SQLite3 in Linux from source code (amalgamation)
wget https://www.sqlite.org/2018/sqlite-autoconf-3240000.tar.gz
tar xvfz sqlite-autoconf-3240000.tar.gz
cd sqlite-autoconf-3240000
./configure
make
make install # you may need sudo
@ryansimms
ryansimms / circleci-2.0-eb-deployment.md
Last active February 22, 2024 04:55
Deploying to Elastic Beanstalk via CircleCi 2.0

Deploying to Elastic Beanstalk via CircleCi 2.0

I got to here after spending hours trying to deploy to an Elastic Beanstalk instance via CircleCi 2.0 so I thought I'd write up what worked for me to hopefully help others. Shout out to RobertoSchneiders who's steps for getting it to work with CircleCi 1.0 were my starting point.

For the record, I'm not the most server-savvy of developers so there may be a better way of doing this.

Setup a user on AWS IAM to use for deployments

@giannisp
giannisp / gist:ebaca117ac9e44231421f04e7796d5ca
Last active July 14, 2024 18:27
Upgrade PostgreSQL 9.6.5 to 10.0 using Homebrew (macOS)
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work.
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0."
Database files have to be updated before starting the server, here are the steps that had to be followed:
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default
brew unlink postgresql
brew install postgresql@9.6
brew unlink postgresql@9.6
brew link postgresql
@ibrahimlawal
ibrahimlawal / LC_CTYPE.txt
Created February 27, 2017 07:02 — forked from jampajeen/LC_CTYPE.txt
Centos warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
vi /etc/environment
add these lines...
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
@chronon
chronon / ext.txt
Created February 18, 2017 15:38
List of docker-php-ext-install extension names
Possible values for ext-name:
bcmath
bz2
calendar
ctype
curl
dba
dom
enchant