Skip to content

Instantly share code, notes, and snippets.

View hasantezcan's full-sized avatar
🕺
Dancing

Hasan Tezcan hasantezcan

🕺
Dancing
View GitHub Profile
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@bartholomej
bartholomej / css-media-queries-cheat-sheet.css
Last active July 23, 2024 12:17
CSS Media Query Cheat Sheet (with Foundation)
/*------------------------------------------
Responsive Grid Media Queries - 1280, 1024, 768, 480
1280-1024 - desktop (default grid)
1024-768 - tablet landscape
768-480 - tablet
480-less - phone landscape & smaller
--------------------------------------------*/
@media all and (min-width: 1024px) and (max-width: 1280px) { }
@media all and (min-width: 768px) and (max-width: 1024px) { }
@oilvier
oilvier / bookmark.js
Last active February 14, 2024 10:29
Javascript to add a bookmark - Cross Browser
/**
*
* Add to bookmark
* Several tests are necessary in order for this "simple" action to work in most of the browsers
*
*/
// First, we define the element where the "Add to bookmark" action will trigger
var triggerBookmark = $(".js-bookmark"); // It must be an `a` tag
@kashifrazzaqui
kashifrazzaqui / code_review_checklist.txt
Last active February 17, 2024 23:05
Code Review Checklist
- General
[ ] The code works
[ ] The code is easy to understand
[ ] Follows coding conventions
[ ] Names are simple and if possible short
[ ] Names are spelt correctly
[ ] Names contain units where applicable
[ ] Enums are used instead of int constants where applicable
[ ] There are no usages of 'magic numbers'
[ ] All variables are in the smallest scope possible
flex-flow:column-reverse wrap-reverse;
justify-content:center;
align-content:space-between;
@sam0737
sam0737 / clock.html
Last active April 25, 2024 12:24
OBS Studio: A HTML page for showing current date and time in the video
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>A simple clock</title>
</head>
<body translate="no" >
@joseluisq
joseluisq / export_vscode_extesions.md
Last active May 6, 2024 01:34
How to export your VS Code extensions from terminal

How to export your VS Code extensions from terminal

Note: Unix-like systems only.

  1. Export your extensions to a shell file:
code --list-extensions | sed -e 's/^/code --install-extension /' > my_vscode_extensions.sh
#require 'open_uri_redirections'
require 'open-uri'
require 'nokogiri'
cities = ['sanfrancisco', 'seattle']
search_terms = ['ruby', 'python', 'react', 'java']
cities.each do |city|
search_terms.each do |search_term|
url = "https://#{city}.craigslist.org/search/cpg?query=#{search_term}&is_paid=all"
@boratanrikulu
boratanrikulu / erdem-bayer-mahremiyet.md
Last active July 27, 2019 15:31
Erdem Bayer - Mahremiyet - OYK 2019 YAZ

Erdem Bayer - Mahremiyet - OYK 2019 YAZ

  • Gleen Greenwald
    • Tedx konuşmalarına bakılmalı
  • privacytools.io
    • işin başında olanların ilk bakması gerektiği yer
  • github.com/kickball/awesome-selfhosted
    • verilerini kendi host'unda tutarak işletebileceğin özgür yazılımların listesi
  • VPN-at-home
    • github.com/ezquarii/vpn/at/home
@laughinghan
laughinghan / Every possible TypeScript type.md
Last active June 19, 2024 10:18
Diagram of every possible TypeScript type

Hasse diagram of every possible TypeScript type

  • any: magic, ill-behaved type that acts like a combination of never (the proper [bottom type]) and unknown (the proper [top type])
    • Anything except never is assignable to any, and any is assignable to anything at all.
    • Identities: any & AnyTypeExpression = any, any | AnyTypeExpression = any
    • Key TypeScript feature that allows for [gradual typing].
  • unknown: proper, well-behaved [top type]
    • Anything at all is assignable to unknown. unknown is only assignable to itself (unknown) and any.
    • Identities: unknown & AnyTypeExpression = AnyTypeExpression, unknown | AnyTypeExpression = unknown
  • Prefer over any whenever possible. Anywhere in well-typed code you're tempted to use any, you probably want unknown.