Skip to content

Instantly share code, notes, and snippets.


Mustafa Hastürk muhasturk

View GitHub Profile

Yandex.Disk REST API How To (quick af)

This will be modified, don't worry

1. Register

Simply make standard account on

2. Register App Client

First thing to do is to register new App Client. This can be done in

  • Click on "Create new client" button
View KeyedDecodingContainer+TypeInference.swift
extension KeyedDecodingContainer {
func decodeIfPresent<T: Decodable>(key: K) throws -> T? {
return try decodeIfPresent(T.self, forKey: key)
func decode<T: Decodable>(key: K) throws -> T {
return try decode(T.self, forKey: key)
ghecho / qr.swift
Last active May 29, 2019
Generate a QR image from a string using Swift 4
View qr.swift
import CoreImage
static func createQR(fromString: String) -> CIImage?
let stringData = .utf8)
let filter = CIFilter(name: "CIQRCodeGenerator")
filter?.setValue(stringData, forKey: "inputMessage")
filter?.setValue("H", forKey: "inputCorrectionLevel")
let qrCodeImage = filter?.outputImage
let imageByTransform = qrCodeImage?.transformed(by: CGAffineTransform(scaleX: 15.0, y: 15.0))
devpeds / Singleton.swift
Created Oct 19, 2017
Thread-Safe Singleton Pattern in Swift
View Singleton.swift
/* 1. Class Constant : Lazy initialization is supported. Officially recommanded way */
class Singleton {
static let shared = Singleton()
private init() { } // prevent creating another instances.
/* 2. Nested Struct : Workaround for the lack of static class constants in Swift 1.1 and earlier. still useful
in functions, where static constants and varialbles cannot be used. */
View SnowScene.swift
// SnowView.swift
// fallingsnow
// Created by JungMin Ahn on 2015. 11. 19..
// Copyright © 2015년 SmartStudy. All rights reserved.
import UIKit
import SpriteKit
anonymous /
Created Jun 7, 2015
Sublime Text 3092 3083 latest crack Win32 Win64 Linux64 Linux32 OSX Mac MacOS


For pupil: all binary can be downloaded

After overwriting, maybe need to run chmod +x /path/to/sublime_text. For linux default installation, need to add sudo.

For programmer:

ruario /
Last active Oct 30, 2019
This script automates extracting the contents of a Vivaldi package and installing it into the XDG data home directory (typically "$HOME/.local/share"). It also provides a convenient uninstall script.


Vivaldi Technologies currently only provide .deb and .rpm packages but it is possible to install it on different distros. This install script automates the process.

Install and Upgrade

You can use the script to fetch and install the latest public snapshot like so:

chmod +x    # Only needed the first time
vertexclique /
Last active Jun 9, 2021
Cracking guide for Sublime Text 3 Build 3059 / 3065 ( Mac / Win x86_64 / Windows x86 / Linux x64 / Linux x86 )


Build 3059

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text

wbroek / genymotionwithplay.txt
Last active Apr 16, 2021
Genymotion with Google Play Services for ARM
View genymotionwithplay.txt
NOTE: Easier way is the X86 way, described on
Download the following ZIPs:
ARM Translation Installer v1.1 (
Download the correct GApps for your Android version:
Google Apps for Android 6.0 ( -
Google Apps for Android 5.1 ( -
Google Apps for Android 5.0 ( -
mmstick / Ubuntu Kernel Upgrader Script
Last active Sep 9, 2020
Asks the user whether they want to install the latest RC or stable, then downloads the correct kernel and installs it.
View Ubuntu Kernel Upgrader Script
cd /tmp
if ! which lynx > /dev/null; then sudo apt-get install lynx -y; fi
if [ "$(getconf LONG_BIT)" == "64" ]; then arch=amd64; else arch=i386; fi
function download() {
wget $(lynx -dump -listonly -dont-wrap-pre $kernelURL | grep "$1" | grep "$2" | grep "$arch" | cut -d ' ' -f 4)