Skip to content

Instantly share code, notes, and snippets.

View webuti's full-sized avatar
😎
I may be slow to respond.

Ömer Faruk PARLAR webuti

😎
I may be slow to respond.
View GitHub Profile
@webuti
webuti / Twitter Create Tweet 2023.php
Created November 24, 2023 14:06
Twitter Create Tweet 2023
<?php
class TwitterAPI
{
private $apiUrl = 'https://api.twitter.com/2/tweets';
private $accessToken = '';
private $accessTokenSecret = '';
private $consumerKey = '';
private $consumerSecret = '';
@webuti
webuti / curl.sh
Last active May 6, 2022 08:50
curl bulk file download with header
xargs -n 1 curl -O -J < urllist.txt -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' \
-H 'Accept-Language: tr-TR,tr;q=0.9,en;q=0.8,ja;q=0.7' \
-H 'Connection: keep-alive' \
-H 'Upgrade-Insecure-Requests: 1' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36' \
--compressed \
--insecure
@webuti
webuti / cloudflare.php
Created February 4, 2022 13:30
Cloudflare api > add dns, remove dns,
<?php
class CloudFlare
{
const EMAIL = "";
const API_KEY = "";
const ENDPOINT = 'https://api.cloudflare.com/client/v4/zones';
public $zoneIds = [];
cat config.json|jq -r '.[][].url' | while IFS=$'\t' read -r url; do echo "$url" > "$url".md done
cat config.json|jq -r ".[][4].childs[].url"| while IFS=$'\t' read -r url; do echo "$url" > "$url".md done
@webuti
webuti / Discord.php
Last active November 26, 2020 13:35
Discord basic send message and member list
<?php
class Discord
{
protected $token = "";
protected $guidId = "";
protected $endpoint = "https://discord.com/api/v8";
public function post($query, $data = null)
{
@webuti
webuti / WhatsApp Contacts.js
Last active December 31, 2021 08:59
WhatsApp Contacts
const moduleRaid=function(){return moduleRaid.mID=Math.random().toString(36).substring(7),moduleRaid.mObj={},fillModuleArray=function(){webpackChunkwhatsapp_web_client.push([[moduleRaid.mID],{},function(e){Object.keys(e.m).forEach(function(o){moduleRaid.mObj[o]=e(o)})}])},fillModuleArray(),get=function(e){return moduleRaid.mObj[e]},findModule=function(e){return results=[],modules=Object.keys(moduleRaid.mObj),modules.forEach(function(o){if(mod=moduleRaid.mObj[o],"undefined"!=typeof mod)if("string"==typeof e){if("object"==typeof mod.default)for(key in mod.default)key==e&&results.push(mod);for(key in mod)key==e&&results.push(mod)}else{if("function"!=typeof e)throw new TypeError("findModule can only find via string and function, "+typeof e+" was passed");e(mod)&&results.push(mod)}}),results},{modules:moduleRaid.mObj,constructors:moduleRaid.cArr,findModule:findModule,get:get}};"object"==typeof module&&module.exports?module.exports=moduleRaid:window.mR=moduleRaid(),window.Store=window.mR.findModule("Chat")[0].defau
CREATE TABLE `timezones` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`value` VARCHAR(155) NOT NULL COLLATE 'utf8_unicode_ci',
`label` VARCHAR(255) NOT NULL COLLATE 'utf8_unicode_ci',
PRIMARY KEY (`id`)
)
COLLATE='utf8_unicode_ci'
ENGINE=InnoDB
AUTO_INCREMENT=2;
@webuti
webuti / migrationscript.php
Created August 5, 2018 11:20
latin5 to utf8
<?php
ob_start();
header('Content-Type: text/html; charset=utf-8');
$servername = '127.0.0.1'; // MySQL hostname
$dbuser = 'uu'; // MySQL user
$dbuser_pass = 'rr'; // MySQL password
$dbname = 'dd'; // MySQL database name containing phpSecurePages table
$charset = "latin5";
#!/bin/bash
LC_ALL=C
## Spotify Launch ##
spotify &>/dev/null &
spotiPid=$!
wait=1
printf "Spotify pid is $spotiPid\n"
while [ $wait = 1 ]; do
printf "Waiting for spotify...\n"
sleep 5