Skip to content

Instantly share code, notes, and snippets.

View lanadz-shopify's full-sized avatar
🕶️

Lana Dzyuban lanadz-shopify

🕶️
View GitHub Profile
@lanadz-shopify
lanadz-shopify / git-find-me-the-fucking-deleted-file.sh
Created February 9, 2023 18:36 — forked from joakin/git-find-me-the-fucking-deleted-file.sh
finding a deleted file in a git repository
# If you don't remember the exact path/name, search the log for deleted files
git log --diff-filter=D --summary | grep delete
# Find the file you want to get from the ouput, and use the path
# Find the commits that involved that path
git log --all -- some/path/to/deleted.file
# Bring the file back to life to the current repo (sha commit of parent of commit that deleted)
git checkout shaofthecommitthatdeletedthefile^ -- some/path/to/deleted.file
@lanadz-shopify
lanadz-shopify / Convert PostgreSQL to SQLite
Created December 17, 2022 04:59 — forked from fiftin/Convert PostgreSQL to SQLite
Convert PostgreSQL to SQLite
1. Dump the data only sql to file
$ pg_dump --data-only --inserts YOUR_DB_NAME > dump.sql
2. scp to local
3. Remove the SET statements at the top
such as:
SET statement_timeout = 0;
SET client_encoding = 'SQL_ASCII';
4. Remove the setval sequence queries
@lanadz-shopify
lanadz-shopify / postgres-brew.md
Created December 20, 2018 07:38 — forked from ibraheem4/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
@lanadz-shopify
lanadz-shopify / Rails 3.2.7 SSL Localhost - comments.txt
Last active December 28, 2016 04:37 — forked from trcarden/gist:3295935
Rails 3.2.7 SSL Localhost (no red warnings, no apache config)
Step one, create a DES3 encrypted key with a password.
Step two, remove the DES3 encryption from the key
Step three, create a Signing request to no one.
Step four, sign that thing!
All of that can be summarized into one step:
Create a self-signed certificate:
openssl req -new -newkey rsa:2048 -sha1 -days 365 -nodes -x509 -keyout server.key -out server.crt
req(1ssl) answers what the line does, but I'll put it here for completness:
{
"auto_indent": true,
"bold_folder_labels": false,
"caret_style": "phase",
"color_scheme": "Packages/Color Scheme - Default/Monokai Bright.tmTheme",
"theme": "Soda Dark 3.sublime-theme",
"detect_indentation": true,
"ensure_newline_at_eof_on_save": true,
"fade_fold_buttons": false,
"font_face": "Monaco",