Skip to content

Instantly share code, notes, and snippets.

View jackfiallos's full-sized avatar
👾
experienced developer

Jack Fiallos jackfiallos

👾
experienced developer
View GitHub Profile
@jackfiallos
jackfiallos / deployUser.md
Created December 8, 2018 19:16 — forked from learncodeacademy/deployUser.md
Adding a deploy user in Linux

(wherever it says url.com, use your server's domain or IP)

Login to new server as root, then add a deploy user

sudo useradd --create-home -s /bin/bash deploy
sudo adduser deploy sudo
sudo passwd deploy

And Update the new password

@jackfiallos
jackfiallos / enzyme_render_diffs.md
Created February 12, 2019 14:47 — forked from fokusferit/enzyme_render_diffs.md
Difference between Shallow, Mount and render of Enzyme

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render
@jackfiallos
jackfiallos / gist:29b494fa6682f824be05936eba90c2f4
Created March 5, 2019 21:28 — forked from kublaios/gist:f01cdf4369c86ddd6d71
Making a PEM File for iOS Push Notifications (From Ray Wenderlich's tutorial)
# Convert the .cer file into a .pem file:
$ openssl x509 -in aps_development.cer -inform der -out PushChatCert.pem
# Convert the private key’s .p12 file into a .pem file:
$ openssl pkcs12 -nocerts -in PushChatKey.p12 -out PushChatKey.pem
# Finally, combine the certificate and key into a single .pem file
$ cat PushChatCert.pem PushChatKey.pem > ck.pem
# At this point it’s a good idea to test whether the certificate works.
@jackfiallos
jackfiallos / docker-compose-v1.yml
Created March 14, 2019 07:14 — forked from markheath/docker-compose-v1.yml
Elasticsearch docker compose examples
version: '2.2'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.4.1
container_name: elasticsearch
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
@jackfiallos
jackfiallos / cmd.sh
Created April 22, 2019 14:14 — forked from kelvinn/cmd.sh
Example of using Apache Bench (ab) to POST JSON to an API
# post_loc.txt contains the json you want to post
# -p means to POST it
# -H adds an Auth header (could be Basic or Token)
# -T sets the Content-Type
# -c is concurrent clients
# -n is the number of requests to run in the test
ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/
@jackfiallos
jackfiallos / Readme.md
Last active July 30, 2024 14:20
Import SSL Comodo cert to AWS Certificate Manager

Install your Comodo Certificates to Amazon AWS

Comodo, the leading Internet Security Provider offers Free Antivirus, SSL Certificate and other Internet Security related products with complete protection. In this post I will walk you through the setup of SSL in Amazon CloudFront (the process is common to all Amazon services)

AWS need that all your certificates are in PEM format. They are two main of encoding certificate:

DER: is a binary encoding of a certificate. Typically these use the file extension of .crt or .cert.

PEM: is a Base64 encoding of a certificate represented in ASCII therefore it is readable as a block of text. This is very useful as you can open it in a text editor work with the data more easily. Comodo certificate are delivered in DER format .crt, so we need to convert them to PEM.

@jackfiallos
jackfiallos / laravellocal.md
Created May 12, 2019 12:42 — forked from hootlex/laravellocal.md
Run laravel project locally

##Windows users:

cmder will be refered as console

##Mac Os, Ubuntu and windows users continue here:

  • Create a database locally named homestead utf8_general_ci
@jackfiallos
jackfiallos / stripe.typings.d.ts
Created August 19, 2019 10:01
StripeJS type definitions
// Type definitions for stripe elements
// Project: https://stripe.com/docs/elements/reference
// Definitions by: Tony Ranieri
// Definitions:
interface StripeFactory {
new (apiKey: string): Stripe;
}
interface Stripe {
sudo rabbitmqctl list_connections pid port state user vhost recv_cnt send_cnt send_pend name \
| grep -vP 'Listing|pid' \
| awk '{print "rabbitmqctl close_connection \"" $1 "\" \"manually closing idle connection\"" }' \
| sudo sh
@jackfiallos
jackfiallos / gist:42259a97daeeba4bbfac253c41277b86
Created June 8, 2020 06:52
Install redmine plugins (DMSF)
sudo apt-get install xapian-omega ruby-xapian libxapian-dev xpdf poppler-utils antiword unzip catdoc libwpd-tools \
libwps-tools gzip unrtf catdvi djview djview3 uuid uuid-dev xz-utils libemail-outlook-message-perl
cd /opt/redmine/plugins/
sudo wget https://github.com/danmunn/redmine_dmsf/archive/master.zip
sudo mv master.zip redmine_dmsf.zip
sudo unzip redmine_dmsf.zip
sudo rm redmine_dmsf.zip
sudo passenger-config restart-app
sudo service nginx restart