Skip to content

Instantly share code, notes, and snippets.

View gokaybiz's full-sized avatar
🌪️
Focusing

gokaybiz

🌪️
Focusing
View GitHub Profile
@gokaybiz
gokaybiz / linktl.api.php
Last active June 4, 2017 12:39
Link.tl bypass
<?php
function linktlCURL($link, $ref) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$link);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_REFERER, $ref);
curl_setopt($ch, CURLOPT_COOKIE, "ads_impression=19; ads_impression3=19;");
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36");
$ret = curl_exec($ch);
@gokaybiz
gokaybiz / contact.gs
Created July 16, 2017 08:54
Contact form with Google Scripts
var secret = '<recaptcha_secret>';
var tomail = '<mail>@gmail.com';
function doGet(e) {
return ContentService.createTextOutput('Hayirdir?');
}
function doPost(e) {
var captchakey = (e.parameters.captcha) || "";
var name = (e.parameters.name) || "";
@gokaybiz
gokaybiz / main.js
Last active March 4, 2019 18:19
Simple nodejs http server and api request
let log = console.log,
port = process.env.port || 8081
const http = require("http"),
web = http.createServer(
(req, res) => {
log(`Istek geldi: |${req.method}| ${req.url}`)
if (req.url == '/uzat') {
let todos = http.request({
@gokaybiz
gokaybiz / renew.go
Last active March 5, 2019 19:26
Itu kutuphane otomasyon
package main
import (
"crypto/tls"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/http/cookiejar"
"os"
@gokaybiz
gokaybiz / main.go
Created March 6, 2019 19:28
Arg calculator - Sum numbers
package main
import (
"fmt"
"os"
"strconv"
)
func main() {
r := os.Args[1:] //remove info prefix
@gokaybiz
gokaybiz / plice.js
Created August 18, 2019 12:23
python's slice in javascript
Array.prototype.plice = function (el) {
return ((el == -1) ? this.slice(el) : this.slice(el, el+1))[0] || undefined
}
[
{
"GBSeq_locus": "NP_056066",
"GBSeq_length": "823",
"GBSeq_moltype": "AA",
"GBSeq_topology": "linear",
"GBSeq_division": "PRI",
"GBSeq_update-date": "27-SEP-2019",
"GBSeq_create-date": "26-APR-2000",
"GBSeq_definition": "ATM interactor isoform 1 [Homo sapiens]",
@gokaybiz
gokaybiz / rename.go
Created February 16, 2020 23:47
Add suffix between file name and extensions
func fileNameRename(fileName, suffix string) (newFName string) {
exts := strings.Split(fileName, ".")
newFName = exts[0] + "_" + suffix + fileName[len(fileName[0:len(exts[0])]):]
return
}
@gokaybiz
gokaybiz / install-chrome-headless.sh
Created May 1, 2020 09:37 — forked from ipepe/install-chrome-headless.sh
Installing headless chrome on Ubuntu.
#!/bin/bash
# from https://chromium.woolyss.com/
# and https://gist.github.com/addyosmani/5336747
# and https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:canonical-chromium-builds/stage
sudo apt-get update
sudo apt-get install chromium-browser
chromium-browser --headless --no-sandbox http://example.org/
@gokaybiz
gokaybiz / tbtblocker.user.js
Created September 3, 2020 12:01
Tahribat uye gizleyici
// ==UserScript==
// @name Uyuzum bu elemana
// @match http*://*.tahribat.com/*
// @grant GM_notification
// @grant window.focus
// ==/UserScript==
var tanrininBelalari=["arabaci88","KaptaN","HolyOne","neverland"].map(function(a){return a.toLowerCase()}),posts=document.querySelectorAll("div.postPanel"),threads=document.querySelectorAll("#activeTopicsBig > tbody > tr"),notificationDetails={text:"{} denen murid artik senin kafani acamaz.",title:"{} gizlendi!",timeout:2900,onclick:function(){alert("Oynama tikim var.");window.focus()}};
0<posts.length&&posts.forEach(function(a){var c=a.querySelector("a").innerText.toLowerCase();if(tanrininBelalari.includes(c)){var b=Object.assign({},notificationDetails);b.text=notificationDetails.text.replace("{}",c);b.title=notificationDetails.title.replace("{}","Cevap");GM_notification(b);a.parentElement.parentElement.remove()}});
0<threads.length&&threads.forEach(function(a){var c=a.querySelector("td:nth-child(2) a").innerText.toLowerCase();if(tanrinin