Skip to content

Instantly share code, notes, and snippets.

@Yengas
Yengas / Kissanime.js
Last active February 11, 2025 20:40
Continous watching, Localstorage features(Where you left an episode), Downloading and Streaming functionality to Kissanime
// ==/UserScript==
// ==UserScript==
// @name Premium Kissanime
// @version 0.5
// @description Tampermonkey script for better kissanime usage.
// @include /https?://(www\.|)kissanime\.(to|org|me|com)/*/
// @copyright 2012+, Yengas
// ==/UserScript==
// Disable Adblock Detection
@Yengas
Yengas / ListOptions.js
Last active August 29, 2015 13:57
TeknoBiyotik Pc Sihirbazı, fiyata göre listeleme
function listOptions(id){
var select = document.getElementById(id), options = select.getElementsByTagName("option");
var i, node, objects = {}, keys, match;
for(i = 0; i < options.length; i++){
node = options[i];
if(node == null || node == undefined || (match = node.innerText.match(/([\d]+,[\d]+) TL/)) == null){ continue; }
objects[parseInt(match[1])] = node;
}
@Yengas
Yengas / RubyGCMSend.rb
Last active August 29, 2015 13:57
Example of GCM HTTP send in Ruby
#encoding: utf-8
require 'net/http'
require 'json'
require 'openssl'
GOOGLE_API_KEY = "xxxxx";
GOOGLE_PROJECT_NUMBER = "xxxx";
data = { 'message' => 'Deneme' };
to = ["put", "keys", "in", "this", "array"];
@Yengas
Yengas / Whois.java
Created March 11, 2014 22:21
Java WHOIS protocol with TCP
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.InetAddress;
import java.net.Socket;
public class Whois {
public static void main(String[] args) throws Exception {
@Yengas
Yengas / StringCompare.md
Last active January 13, 2021 18:20
Java String comparison, differences between ==, equals, matches, compareTo

String Comparison

In this gist, i will try to explain you what is the main differences between known string comparison techniques and where to use them.

Explanation of methods

==

This is the main equality operator in Java. To summarize it, this method compares the left and right hands references to eachother and returns boolean. This means this operator returns true only if left and right variable both point at the same Object in the memory. As in most of the class comparisons, this operators is discouraged to use if you're not really intented to check if two variables point to same object.

@Yengas
Yengas / MultiDimensionalCombinations.md
Last active July 5, 2017 12:25
Combinations of a multidimensional array

Explanation

This algorithm, from an array like this;

example = [["there"], ["is"], ["", "no"], ["urf level"]]

creates the output of; "there is urf level" and "there is no urf level".

Warning

@Yengas
Yengas / Example.md
Last active August 29, 2015 13:56
Verilen kelimeleri karıştırılmış cümleden, sözlükteki tüm kelimeler ile karşılaştırma yapıp, kombinasyonları listeleme.

Girdi:

olwdelah eb yht amne

Çıktı:

  • hallowed be thy amen
  • hallowed be thy mane
  • hallowed be thy mean
  • hallowed be thy name
@Yengas
Yengas / AltyaziDuzelt.rb
Last active August 29, 2015 13:55
Toplu olarak encoding düzeltmek için yazdığım bir kod. Verilen dizin veya dosyalardaki encoding hatalarını düzeltir. Opsiyonel olarak türkçe karakterleri, ingilizce karakterler haline getirir.
#encoding: UTF-8
#gist-url: https://gist.github.com/Yengas/8761691
@options = {
:d => [ "" ],
:t => ['txt', 'srt', 'sub'], # Dosya uzantıları
:e => ["iso-8859-9", "utf-8"], # Encoding Ayaları -> 0'dan 1'e
:r => false # Türkçe karakterleri sil
};
@total = 0;
@Yengas
Yengas / Javascript.js
Created December 23, 2013 00:04
Youtube şarkısı bittikten sonra, bilgisayarı kapatır çünkü bilgisayarı şarkı bittikten sonra kapanıcak şekilde zamanlamak is oldschool.
var scrubber = document.getElementsByClassName("html5-scrubber-button")[0];
var interval = setInterval(function(){
if(window.parseInt(scrubber.style.webkitTransformOriginX.replace("%","")) == 100){
var ws = new WebSocket("ws://192.168.1.10:6321");
ws.onopen = function(){ ws.send("shut"); };
}
}, 5000);
@Yengas
Yengas / markAntalya.rb
Last active December 31, 2015 23:49
MarkAntalya ön panel animasyonu, basit bir yaklaşım.
array = "ABCDEFGHJKLMNOPRSTYZ".split("");
width = 5;
panel = [20,50];
sayac = 0;
length = array.count;
limit = width * length;
while (true) do
for r in 0..panel[0] do
for c in 0..panel[1] do