Skip to content

Instantly share code, notes, and snippets.

View halk's full-sized avatar

Halil Köklü halk

View GitHub Profile
require File.expand_path("../../Abstract/abstract-php-extension", __FILE__)
class Php56Ioncubeloader < AbstractPhp56Extension
init
desc "Loader for ionCube Secured Files"
homepage "http://www.ioncube.com/loaders.php"
if MacOS.prefer_64_bit?
url "http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_dar_x86-64.tar.gz"
sha256 "b7c72d0fc35c4af95b1db3b6125f7647f948a2567a5cd9ffa18be1716d78fdc3"
else
@halk
halk / tesbih.sh
Created July 28, 2016 11:36
tesbih.sh
#!/bin/bash
function cek
{
i="0"
while [ $i -lt 33 ]; do
i=$[$i+1]
printf "$i "
done
echo ""
@halk
halk / check.py
Created October 2, 2015 12:52
Check if your contacts were pwned
import re
import urllib
import urllib2
import json
with open('contacts.vcf', 'r') as f:
vcf = f.read()
for match in re.finditer(r'([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4})', vcf):
email = match.group()
@halk
halk / reset_creation_date.sh
Last active September 21, 2019 22:16
Change order by creation date
#!/bin/bash
COUNTER=$(($(ls -l | wc -l)-1))
IFS=$'\n' # make new lines the only separator
for f in `ls | sort -n`
do
# for linux: touch -t `date -v-${COUNTER}S '+%Y%m%d%H%M.%S'` $f
SetFile -d `date -v-${COUNTER}S '+%m/%d/%Y %H:%M:%S'` $f # Mac OS X
COUNTER=$((COUNTER-1))
@halk
halk / gist:6917675
Created October 10, 2013 12:40
Fix candidate for Magento core bug: Magento API does not work with HTTP Basic Auth in combination with https backend
diff --git a/public/app/code/core/Mage/Api/Model/Server/Adapter/Soap.php b/public/app/code/core/Mage/Api/Model/Server/Adapter/Soap.php
index aca1f93..0212822 100644
--- a/public/app/code/core/Mage/Api/Model/Server/Adapter/Soap.php
+++ b/public/app/code/core/Mage/Api/Model/Server/Adapter/Soap.php
@@ -206,7 +206,7 @@ class Mage_Api_Model_Server_Adapter_Soap
$phpAuthPw = $this->getController()->getRequest()->getServer('PHP_AUTH_PW', false);
if ($phpAuthUser && $phpAuthPw) {
- $wsdlUrl = sprintf("http://%s:%s@%s", $phpAuthUser, $phpAuthPw, str_replace('http://', '', $wsdlUrl ) );
+ $wsdlUrl = sprintf("http://%s:%s@%s", $phpAuthUser, $phpAuthPw, str_replace(array('http://', 'https://'), '', $wsdlUrl ) );