Skip to content

Instantly share code, notes, and snippets.

Avatar

ruhenheim ruhenheim

  • Kumamoto
View GitHub Profile
@nobuoka
nobuoka / java-for-android-app.markdown
Last active Oct 16, 2020
Android アプリ開発勉強会のために書いた Java の入門文書
View java-for-android-app.markdown

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

MEMO

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

はじめに

@saboyutaka
saboyutaka / turbolinks_note.md
Last active Aug 17, 2020
Turbolinksを調べてみた
View turbolinks_note.md
@peter
peter / carrierwave-file-size-limit-example.rb
Created Mar 7, 2014
Checking and Limiting File Size of Uploaded Files with Carrierwave
View carrierwave-file-size-limit-example.rb
# NOTE: There must be a better way to do this - help appreciated!
###############################################################
# uploaded_file.rb - utility class
###############################################################
class UploadedFile
def self.size(file)
uploaded?(file) ? file.size : nil
end
@DmZ
DmZ / pre-commit
Last active Sep 13, 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
@nulltask
nulltask / 20140826.md
Last active Sep 13, 2020
Express / Socket.IO をスケールアウトしてみよう
View 20140826.md
@koudaiii
koudaiii / gist:735ef14b83ee31ac0967
Last active Oct 22, 2020
NginxでのSSL設定の細かい意味
View gist:735ef14b83ee31ac0967

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

listen 443 ssl
ssl     on;
  • nginxの確認

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

@dduvnjak
dduvnjak / pre-commit
Last active Aug 22, 2018 — forked from DmZ/pre-commit
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=5da2c1fe8f6458e32d11110e0ebdd915e472c6e0
fi
@syafiqfaiz
syafiqfaiz / how-to-copy-aws-rds-to-local.md
Last active Oct 22, 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
@tony-gutierrez
tony-gutierrez / AWS_Single_LetsEncrypt.yaml
Last active Oct 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
@shuntksh
shuntksh / file0.js
Last active Mar 31, 2017
WebpackってCSS周りのLoaderがいっぱいあって分かりにくいので整理してみる ref: http://qiita.com/shuntksh/items/bb5cbea40a343e2e791a
View file0.js
{
test: /\.css$/,
loader: "style-loader!css-loader?modules&importLoaders=1&camelCase!postcss-loader",
},
You can’t perform that action at this time.