Skip to content

Instantly share code, notes, and snippets.

View leylaKapi's full-sized avatar
💭
I may be slow to respond.

Leyla Kapi Kurtul leylaKapi

💭
I may be slow to respond.
  • Hamburg / Germany
View GitHub Profile
@leylaKapi
leylaKapi / video-example.rb
Created May 2, 2018 08:35 — forked from arirusso/video-example.rb
ruby-processing: video processing example
#!/usr/bin/env ruby
# this is a test of ruby-processing (https://github.com/jashkenas/ruby-processing) with the video library
# use "rp5 unpack library" at a command line to install the video library, among others
# tested with Ruby 1.9.2
# video file: http://bit.ly/H5yBjK
class VideoTest < Processing::App
@leylaKapi
leylaKapi / pg-downgrade-semaphore.sh
Last active March 6, 2019 09:53 — forked from ceicke/pg-downgrade-semaphore.sh
Downgrade PostgreSQL on Semaphore
#!/usr/bin/env bash -l
set -e
###
# Add the line below to your setup command in Project Settings
#
# wget https://gist.githubusercontent.com/mimimalizam/27959bbc653de3965bb40955f4bc43df/raw/pg-downgrade-semaphore.sh && bash pg-downgrade-semaphore.sh
#
# Note: reset your dependency cache in Project Settings > Admin, before running this script
@leylaKapi
leylaKapi / rails http status codes
Created September 24, 2019 16:21 — forked from mlanett/rails http status codes
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@leylaKapi
leylaKapi / how-to-copy-aws-rds-to-local.md
Created February 22, 2021 14:09 — 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