Skip to content

Instantly share code, notes, and snippets.

View askn's full-sized avatar
🤔
[object Function]

Aşkın Gedik askn

🤔
[object Function]
View GitHub Profile
@askn
askn / browser_history.md
Created July 16, 2020 16:52 — forked from dropmeaword/browser_history.md
Playing around with Chrome's history

Browser histories

Unless you are using Safari on OSX, most browsers will have some kind of free plugin that you can use to export the browser's history. So that's probably the easiest way. The harder way, which seems to be what Safari wants is a bit more hacky but it will also work for other browsers. Turns out that most of them, including Safari, have their history saved in some kind of sqlite database file somewhere in your home directory.

The OSX Finder cheats a little bit and doesn't show us all the files that actually exist on our drive. It tries to protect us from ourselves by hiding some system and application-specific files. You can work around this by either using the terminal (my preferred method) or by using the Cmd+Shft+G in Finder.

Finder

Once you locate the file containing the browser's history, copy it to make a backup just in case we screw up.

@askn
askn / README.md
Created August 1, 2019 14:54 — forked from tmilos/README.md
Modified Preorder Tree Traversal

Modified Preorder Tree Traversal

Hierarchical data metrics that allows fast read operations on tree like structures.

Based on Left and Right fields that are set during tree traversal. When entered into node value is set to it's Left, when exiting node value is set to it's Right.

Sample implementation

@askn
askn / install-comodo-ssl-cert-for-nginx.rst
Created August 9, 2018 08:08 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@askn
askn / port_open.rb
Created July 31, 2017 13:23 — forked from ashrithr/port_open.rb
check if port is open on a remote host
#!/usr/bin/env ruby
require 'socket'
require 'timeout'
unless ARGV.length == 2
abort "Usage: ruby #{__FILE__} HOST PORT"
end
def port_open?(ip, port, seconds=1)
# => checks if a port is open or not on a remote host
Timeout::timeout(seconds) do

NOTE!!!!!!!!! Ended up in trouble going down this path. Followed Rails 3 in Action method instead

generate

rails plugin new importable --dummy-path=spec/dummy --full --mountable && cd importable

in .gitignore change references to test/dummy to spec/dummy (rails bug¿)

spec/dummy/db/*.sqlite3

spec/dummy/log/*.log

@askn
askn / query_planner.markdown
Created May 4, 2016 14:22 — forked from hgmnz/query_planner.markdown
PostgreSQL query plan and SQL performance notes

Types of index scans

Indexes

Sequential Scan:

  • Read every row in the table
  • No reading of index. Reading from indexes is also expensive.
@askn
askn / nginx.conf
Created April 11, 2016 06:39 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@askn
askn / devise.tr.yml
Created December 11, 2015 12:35 — forked from cihad/devise.tr.yml
Turkish translations for Devise
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
tr:
devise:
confirmations:
confirmed: "Eposta adresiniz başırılı bir şekilde onaylandı."
send_instructions: "Bir kaç dakika içerisinde eposta adresinizi nasıl onaylayacağınız hakkında bir eposta alacaksınız."
send_paranoid_instructions: "Eğer eposta adresinizi veritabanımızda kayıtlı ise bir kaç dakika içerisinde eposta adresinizi nasıl onaylayacağınız hakkında bir eposta alacaksınız."
failure:
already_authenticated: "Zaten giriş yaptınız."
tr:
admin:
js:
true: Doğru
false: Yanlış
is_present: Mevcut
is_blank: Boş
date: Tarih ...
between_and_: ... ile ... arası
today: Bugün

Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

This is where any fun you might have been having ends. Now it’s time to get serious and talk about rules.

Writing CSS is hard. Even if you know all the intricacies of position and float and overflow and z-index, it’s easy to end up with spaghetti code where you need inline styles, !important rules, unused cruft, and general confusion. This guide provides some architecture for writing CSS so it stays clean and ma