Skip to content

Instantly share code, notes, and snippets.

@frozeny
frozeny / commit.png
Created June 2, 2019 12:57 — forked from primaryobjects/commit.png
How to setup prettier as a pre-commit hook for Git commits.
commit.png
@frozeny
frozeny / iterm2-oh-my-fish.md
Created April 2, 2019 15:58 — forked from normanlolx/iterm2-oh-my-fish.md
iTerm2 Solarized Dark theme + Fish shell + oh-my-fish /// macOS High Sierra
@frozeny
frozeny / introrx.md
Created November 10, 2018 12:55 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@frozeny
frozeny / AwsV4SignatureCalculator.cs
Created November 5, 2018 22:29 — forked from yvanin/AwsV4SignatureCalculator.cs
This C# code calculates a request signature using Version 4 signing process. It was developed for and tested on Amazon SQS requests, so it does not cover every scenario for the other services, e.g. multipart uploads are not supported. Nevertheless, it's simple and independent single class that can be easily embedded into other projects. .NET Fra…
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Globalization;
using System.Linq;
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
namespace AwsV4SignatureCalculator
@frozeny
frozeny / how-to-copy-aws-rds-to-local.md
Created October 24, 2018 09:25 — forked from syafiqfaiz/how-to-copy-aws-rds-to-local.md
How to copy production database on AWS RDS(postgresql) to local development database.
  1. Change your database RDS instance security group to allow your machine to access it.
    • Add your ip to the security group to acces the instance via Postgres.
  2. Make a copy of the database using pg_dump
    • $ pg_dump -h <public dns> -U <my username> -f <name of dump file .sql> <name of my database>
    • you will be asked for postgressql password.
    • a dump file(.sql) will be created
  3. Restore that dump file to your local database.
    • but you might need to drop the database and create it first
    • $ psql -U <postgresql username> -d <database name> -f <dump file that you want to restore>
  • the database is restored
@frozeny
frozeny / setup.md
Created February 19, 2018 11:07 — forked from shashankmehta/setup.md
Setup PHP and Composer on OSX via Brew

First install Brew on your MAC

  • Setup Brew: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • brew update
  • brew tap homebrew/dupes
  • brew tap homebrew/php
  • Install PHP 7.0.+ brew install php70
  • Install mcrypt: brew install mcrypt php70-mcrypt
  • Finally, install composer: brew install composer
@frozeny
frozeny / default
Created February 19, 2018 07:48 — forked from dtomasi/default
Brew Nginx PHP7
server {
listen 80;
server_name localhost;
root /Users/YOUR_USERNAME/Sites;
access_log /Library/Logs/default.access.log main;
location / {
include /usr/local/etc/nginx/conf.d/php-fpm;
}
@frozeny
frozeny / postgres-brew.md
Created February 19, 2018 02:53 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@frozeny
frozeny / default.conf
Created February 17, 2018 15:47 — forked from wahyudibo/default.conf
Install nginx, php 70 (with fpm), and mysql in Mac OS X
server {
listen 80;
server_name localhost;
root /Users/wahyudibo/Projects/mylabs/php/nginx;
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
@frozeny
frozeny / drupal.conf
Created February 17, 2018 15:26
Drupal 8 Nginx Config
server {
listen 80; # redundant in new nginx versions
server_name yourserver.com www.yourserver.com;
root /usr/share/nginx/www/drupal;
access_log off;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
location ~ \..*/.*\.php$ {
return 403;