Skip to content

Instantly share code, notes, and snippets.

document.documentElement.style.setProperty("filter", "invert(100%)");
document.querySelectorAll("svg,path,img,video").forEach((i) => {
i.parentElement.style.setProperty("filter", "invert(100%)");
i.style.setProperty("filter", "invert(100%)");
});
// asd
const sponsorHeader = document.getElementById("sponsorHeader");
const sponsorBanner = document.getElementById("sponsorBanner");
const newsletterHeader = document.getElementById("newsletterHeader");
const elDistanceToTop = !sponsorBanner
? 0
: window.pageYOffset + sponsorBanner.getBoundingClientRect().top;
if (sponsorHeader) sponsorHeader.style.display = "none";
@talhaakkaya
talhaakkaya / resize_disk_image.md
Created February 15, 2022 19:31 — forked from joseluisq/resize_disk_image.md
How to resize a qcow2 disk image on Linux

How to resize a qcow2 disk image on Linux

This example takes olddisk.qcow2 and resizes it into newdisk.qcow2, extending one of the guest's partitions to fill the extra space.

1. qcow2 format

1.1. Verify the filesystems of olddisk.qcow2

execute pathogen#infect()
syntax on
set number
set nowrap
set mouse=r
set shortmess=a
set laststatus=2
set showtabline=2
let g:netrw_liststyle = 3
let g:netrw_list_hide='.*\.swp$'
@talhaakkaya
talhaakkaya / arch-linux-install-encryption
Created July 13, 2017 07:24 — forked from dust321/arch-linux-install-encryption
Minimal instructions for installing Arch Linux on an DOS/BIOS system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system, for BIOS. Dustin dut n ex 5 a t g ma il
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
@talhaakkaya
talhaakkaya / arch-linux-install
Created July 13, 2017 07:03 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap
chflags uchg ~/Library/Mail/V3/MailData/Signatures/*.mailsignature
@talhaakkaya
talhaakkaya / index.md
Last active August 29, 2015 14:23 — forked from rstacruz/index.md

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one

# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:
CREATE TABLE urunler (
id int PRIMARY KEY,
ad varchar(255),
nitelik varchar(255),
fiyat float
);
CREATE TABLE musteriler (
id int PRIMARY KEY,
ad varchar(255),
soyad varchar(255),