Skip to content

Instantly share code, notes, and snippets.

View muhasturk's full-sized avatar
🇹🇷
🧿👨🏼‍💻

Mustafa Hastürk muhasturk

🇹🇷
🧿👨🏼‍💻
View GitHub Profile
@yuxel
yuxel / varnish.vcl
Last active December 29, 2015 04:49
Özgür Web Teknolojileri Günleri 2013'deki Varnish Konfigursayonu
# This is a basic VCL configuration file for varnish. See the vcl(7)
# man page for details on VCL syntax and semantics.
#
# Default backend definition. Set this to point to your content
# server.
#
backend server1 {
.host = "haber.local";
.port = "8080";
}
@mmstick
mmstick / Ubuntu Kernel Upgrader Script
Last active March 11, 2023 04:53
Asks the user whether they want to install the latest RC or stable, then downloads the correct kernel and installs it.
#!/bin/bash
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)
}
@wbroek
wbroek / genymotionwithplay.txt
Last active February 12, 2024 03:22
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
@vertexclique
vertexclique / cracking.md
Last active April 8, 2024 18:24
Cracking guide for Sublime Text 3 Build 3059 / 3065 ( Mac / Win x86_64 / Windows x86 / Linux x64 / Linux x86 )

MacOS

Build 3059

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

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

@ruario
ruario / install-vivaldi.md
Last active September 8, 2021 13:48
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.

Summary

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 install-vivaldi.sh # Only needed the first time
anonymous
anonymous / sublime_text3_crack.md
Created June 7, 2015 04:58
Sublime Text 3092 3083 latest crack Win32 Win64 Linux64 Linux32 OSX Mac MacOS

cat

For pupil: all binary can be downloaded http://pan.baidu.com/s/1hqH2Pko

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

For programmer:

VERSION PLATFORM OFFSET ORIGINAL CRACKED
@minsOne
minsOne / SnowScene.swift
Last active January 30, 2020 21:16
Falling Snow
//
// SnowView.swift
// fallingsnow
//
// Created by JungMin Ahn on 2015. 11. 19..
// Copyright © 2015년 SmartStudy. All rights reserved.
//
import UIKit
import SpriteKit
@devpeds
devpeds / Singleton.swift
Created October 19, 2017 15:38
Thread-Safe Singleton Pattern in 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. */
@ghecho
ghecho / qr.swift
Last active May 29, 2019 12:32
Generate a QR image from a string using Swift 4
import CoreImage
static func createQR(fromString: String) -> CIImage?
{
let stringData = fromString.data(using: .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))
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)
}
}