Skip to content

Instantly share code, notes, and snippets.

ruhenheim ruhenheim

  • Kumamoto
Block or report user

Report or block ruhenheim

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tony-gutierrez
tony-gutierrez / AWS_Single_LetsEncrypt.yaml
Last active May 28, 2020
AWS Elastic Beanstalk .ebextensions config for single instance free SSL using letsencrypt certbot and nginx. http://bluefletch.com/blog/domain-agnostic-letsencrypt-ssl-config-for-elastic-beanstalk-single-instances/
View AWS_Single_LetsEncrypt.yaml
# Dont forget to set the env variable "certdomain", and either fill in your email below or use an env variable for that too.
# Also note that this config is using the LetsEncrypt staging server, remove the flag when ready!
Resources:
sslSecurityGroupIngress:
Type: AWS::EC2::SecurityGroupIngress
Properties:
GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]}
IpProtocol: tcp
ToPort: 443
@syafiqfaiz
syafiqfaiz / how-to-copy-aws-rds-to-local.md
Last active May 28, 2020
How to copy production database on AWS RDS(postgresql) to local development database.
View how-to-copy-aws-rds-to-local.md
  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
@DmZ
DmZ / pre-commit
Last active May 27, 2020
Git pre-commit hook to search for Amazon AWS API keys.
View pre-commit
#!/bin/sh
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi
@saboyutaka
saboyutaka / turbolinks_note.md
Last active May 15, 2020
Turbolinksを調べてみた
View turbolinks_note.md
@yoshiki-0428
yoshiki-0428 / setUp.sh
Last active May 11, 2020
Mac OSの初期化時に設定するshellです。1: Setup Mac 2: Brew install 3: Apple App install
View setUp.sh
#!/bin/bash
# ================================================================================
# 【For Mac】MacOS.sh : Setup MacOS
# ================================================================================
if [ "$(uname)" != "Darwin" ] ; then
echo 'Not macOS!'
exit 1
@koudaiii
koudaiii / gist:735ef14b83ee31ac0967
Last active May 9, 2020
NginxでのSSL設定の細かい意味
View gist:735ef14b83ee31ac0967

NginxでのSSL設定(もうちょっと詳しく)

listen 443 ssl
ssl     on;
  • nginxの確認

nginxをmakeするときに「–with-openssl=」オプションを使わずにsslに対応してあることを確認しておく。

@giannisp
giannisp / gist:ebaca117ac9e44231421f04e7796d5ca
Last active Apr 19, 2020
Upgrade PostgreSQL 9.6.5 to 10.0 using Homebrew (macOS)
View gist:ebaca117ac9e44231421f04e7796d5ca
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
@mala
mala / CVE-2019-5418_is_RCE.md
Last active Mar 29, 2020
Rails の CVE-2019-5418 は RCE (Remote code execution) です
View CVE-2019-5418_is_RCE.md
@nobuoka
nobuoka / java-for-android-app.markdown
Last active Dec 16, 2019
Android アプリ開発勉強会のために書いた Java の入門文書
View java-for-android-app.markdown

Android アプリ開発のための Java 入門

MEMO

  • declaration は 「宣言」 と訳しているが、「定義」 の方が適しているような気がしなくもない。
  • 「インスタンス」 と 「オブジェクト」 という言葉を使うことがあるが、本文書中ではどちらも同じ意味で使用している。
  • String オブジェクト」 という表現は、「String クラスのインスタンス」 を意味している。 (Java に限らず一般的な表現だと思う。)

はじめに

@nulltask
nulltask / 20140826.md
Last active Dec 8, 2019
Express / Socket.IO をスケールアウトしてみよう
View 20140826.md
You can’t perform that action at this time.