Skip to content

Instantly share code, notes, and snippets.

View anvarazizov's full-sized avatar

Anvar Azizov anvarazizov

View GitHub Profile
@julians
julians / ExportKindle.js
Last active August 3, 2020 20:56 — forked from jkubecki/ExportKindle.js
Amazon Kindle Export
/*
The following data should be run in the console while viewing the page https://read.amazon.com/
It will export a CSV file called "download" which can (and should) be renamed with a .csv extension
modified version of the original script: https://gist.github.com/jkubecki/d61d3e953ed5c8379075b5ddd8a95f22
changes:
* adds a column indicating samples (EBSP)
* updates the database version
* escapes double quotes instead of stripping them
*/
@sundowndev
sundowndev / GoogleDorking.md
Last active November 15, 2024 20:47
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
@jasewarner
jasewarner / gitignore-for-wordpress-theme
Last active October 2, 2024 08:22
WordPress project .gitignore
# ignore everything in the root except the "wp-content" directory.
/*
!wp-content/
# ignore everything in the "wp-content" directory, except the themes directories
wp-content/*
!wp-content/themes/
# ignore all mu-plugins, plugins, and themes
# unless explicitly whitelisted at the end of this file
@maestrow
maestrow / post.md
Last active June 25, 2024 17:17
Теория категорий в программировании
@hollance
hollance / eliza.swift
Last active August 12, 2024 15:26
The classic ELIZA chat bot in Swift.
/*
Joseph Weizenbaum's classic ELIZA chat bot in Swift.
Based on the IBM PC BASIC program from CREATIVE COMPUTING by Patricia
Danielson and Paul Hashfield, and the Java adaptation by Jesper Juul.
Run this script from Terminal:
$ swift eliza.swift
Press Ctrl-C or Ctrl-D to quit. (Or type "shut up".)
@phi161
phi161 / coordinate_systems.swift
Last active April 27, 2022 11:27
Converting Between View Coordinate Systems
import UIKit
import PlaygroundSupport
class MyViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Main view
view.backgroundColor = .black
@VimleshS
VimleshS / git-rebase.markdown
Created January 28, 2016 09:00 — forked from tmcgilchrist/git-rebase.markdown
Git rebase workflow

Checkout a new working branch

 git checkout -b <branchname>

Make Changes

 git add
 git commit -m "description of changes"

Sync with remote

@Kadasiddha
Kadasiddha / KKBCrypt.h
Created December 11, 2015 05:06
Bcrypt objective-c implementation with a bridging header in swift. This is tested on iOS 9.2.
//
// KKBCrypt.h
//
// Created by Kadasiddha Kullolli on 11/12/2015.
// Copyright 2015 Kadasiddha Kullolli
#import <Foundation/Foundation.h>
#import "KKGC.h" // For GC related macros
@justinmfischer
justinmfischer / combineDateWithTime
Last active October 6, 2021 13:22
Combine date and time into a single NSDate in Swift 2.0
func combineDateWithTime(date: NSDate, time: NSDate) -> NSDate? {
let calendar = NSCalendar.currentCalendar()
let dateComponents = calendar.components([.Year, .Month, .Day], fromDate: date)
let timeComponents = calendar.components([.Hour, .Minute, .Second], fromDate: time)
let mergedComponments = NSDateComponents()
mergedComponments.year = dateComponents.year
mergedComponments.month = dateComponents.month
mergedComponments.day = dateComponents.day
@leemorgan
leemorgan / Clamp.swift
Last active November 9, 2022 15:36
clamp() in Swift
///Returns the input value clamped to the lower and upper limits.
func clamp<T: Comparable>(value: T, lower: T, upper: T) -> T {
return min(max(value, lower), upper)
}
//-----------------------------------------------
// Example usage
let proposedIndex = 6