Skip to content

Instantly share code, notes, and snippets.

View egulhan's full-sized avatar
Here we go again...

Erman Gülhan egulhan

Here we go again...
View GitHub Profile
var MD5 = function(d){var r = M(V(Y(X(d),8*d.length)));return r.toLowerCase()};function M(d){for(var _,m="0123456789ABCDEF",f="",r=0;r<d.length;r++)_=d.charCodeAt(r),f+=m.charAt(_>>>4&15)+m.charAt(15&_);return f}function X(d){for(var _=Array(d.length>>2),m=0;m<_.length;m++)_[m]=0;for(m=0;m<8*d.length;m+=8)_[m>>5]|=(255&d.charCodeAt(m/8))<<m%32;return _}function V(d){for(var _="",m=0;m<32*d.length;m+=8)_+=String.fromCharCode(d[m>>5]>>>m%32&255);return _}function Y(d,_){d[_>>5]|=128<<_%32,d[14+(_+64>>>9<<4)]=_;for(var m=1732584193,f=-271733879,r=-1732584194,i=271733878,n=0;n<d.length;n+=16){var h=m,t=f,g=r,e=i;f=md5_ii(f=md5_ii(f=md5_ii(f=md5_ii(f=md5_hh(f=md5_hh(f=md5_hh(f=md5_hh(f=md5_gg(f=md5_gg(f=md5_gg(f=md5_gg(f=md5_ff(f=md5_ff(f=md5_ff(f=md5_ff(f,r=md5_ff(r,i=md5_ff(i,m=md5_ff(m,f,r,i,d[n+0],7,-680876936),f,r,d[n+1],12,-389564586),m,f,d[n+2],17,606105819),i,m,d[n+3],22,-1044525330),r=md5_ff(r,i=md5_ff(i,m=md5_ff(m,f,r,i,d[n+4],7,-176418897),f,r,d[n+5],12,1200080426),m,f,d[n+6],17,-1473231341),i,m,d[n
@ameen-sarsour
ameen-sarsour / PHP apple sign in
Last active November 20, 2023 13:37
this code to try php sign in,
<?php
/**
* This file to test apple sign in,
* Need to app information from Apple
*
* Team Id
* Client Id
* Key Id
* and Private key
@uurtech
uurtech / controller.go
Created March 22, 2020 14:31
Return Http Response and then Perform other tasks
package main
import (
"fmt"
"net/http"
"sync"
"time"
)
func ping(w http.ResponseWriter, r *http.Request) {
@egulhan
egulhan / Delete Slack Message Tool
Created August 2, 2019 13:04 — forked from uurtech/Delete Slack Message Tool
Delete All Slack Messages as a Service
This is just a description of how to use Slack Message Tool,
You can backup and delete all the Slack messages at once with this easy app. Just choose what to do and our amazing magic will do that job for you.
https://www.messagebender.com/
@uurtech
uurtech / Delete Slack Message Tool
Created July 6, 2019 12:52
Delete All Slack Messages as a Service
This is just a description of how to use Slack Message Tool,
You can backup and delete all the Slack messages at once with this easy app. Just choose what to do and our amazing magic will do that job for you.
https://www.messagebender.com/
@poing
poing / laravel_facades.md
Last active March 25, 2024 21:37
Laravel Facades

Understanding Facades in Laravel

What's a Facade?

The Laravel explination, shown below is confusing.

Facades provide a "static" interface to classes that are available in the application's service container. Laravel ships with many facades which provide access to almost all of Laravel's features. Laravel facades serve as "static proxies" to underlying classes in the service container, providing the benefit of a terse, expressive syntax while maintaining more testability and flexibility than traditional static methods.

Many examples use Cache::get('key') to demonstrate how a Facade works. Comparing the following code to the utility that a Facade provides.

@naumanahmed19
naumanahmed19 / version-check.dart
Last active February 25, 2024 14:51
Flutter Force Update IOS and Android App Version
//Prompt users to update app if there is a new version available
//Uses url_launcher package
import 'package:url_launcher/url_launcher.dart';
const APP_STORE_URL =
'https://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftwareUpdate?id=YOUR-APP-ID&mt=8';
const PLAY_STORE_URL =
'https://play.google.com/store/apps/details?id=YOUR-APP-ID';
@uurtech
uurtech / Dockerfile
Created October 4, 2018 09:23
Docker Ubuntu & PHP & Memcached & mongodb & git
FROM ubuntu:latest
RUN apt update && apt upgrade -y
ENV TZ=Europe/Istanbul
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt install apache2 -y
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
RUN apt install -y curl
@debuggerx01
debuggerx01 / visible_items_of_listview.dart
Last active April 8, 2024 07:07
Visible Items of ListView Demo
import 'package:flutter/material.dart';
import 'package:rect_getter/rect_getter.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Visible Demo',
@egulhan
egulhan / drop-all-db-tables.txt
Created December 20, 2017 07:13
Drop all MySQL database tables without foreign key checks
### connect mysql with -s and -r parameter to print "DROP TABLE ..." lines without formated
mysql -u -s -r
### run the following sql query to generate "DROP TABLE ..." queries
SELECT concat('DROP TABLE IF EXISTS ', table_name, ';')
FROM information_schema.tables
WHERE table_schema = '{DBNAME}';
### disable foreign key check
SET FOREIGN_KEY_CHECKS = 0;