Skip to content

Instantly share code, notes, and snippets.

@Mo45
Mo45 / discord.msg.send.php
Last active May 5, 2024 17:25
PHP - Send message to Discord via Webhook
<?php
//=======================================================================================================
// Create new webhook in your Discord channel settings and copy&paste URL
//=======================================================================================================
$webhookurl = "YOUR_WEBHOOK_URL";
//=======================================================================================================
// Compose message. You can use Markdown
// Message Formatting -- https://discordapp.com/developers/docs/reference#message-formatting
@crittermike
crittermike / xdebug_alpine.md
Last active October 1, 2020 12:49
Xdebug + PHPStorm for PHP 7 on Alpine Linux

First, install the Xdebug package from the testing repository.

$ apk add php7-xdebug --repository http://dl-3.alpinelinux.org/alpine/edge/testing/

Now edit the /etc/php7/php.ini file and add the following to the end of it:

zend_extension=/usr/lib/php7/modules/xdebug.so
@izqui
izqui / channels.json
Created October 11, 2015 13:27
Spanish TV Channels
[
[
"1",
"sp",
"es",
"0",
"100",
"La 1",
"i_tve1.png",
"http://iphonelive.rtve.es/LA1_LV3_IPH/LA1_LV3_IPH.m3u8",
@vertexclique
vertexclique / cracking.md
Last active April 8, 2024 18:24
Cracking guide for Sublime Text 3 Build 3059 / 3065 ( Mac / Win x86_64 / Windows x86 / Linux x64 / Linux x86 )

MacOS

Build 3059

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text

@alexkingorg
alexkingorg / spam-comment-script.txt
Created December 22, 2013 16:04
A spam comment script with replacement clauses intact - accidentally submitted in it's entirety to my site.
{
{I have|I've} been {surfing|browsing} online more than {three|3|2|4} hours today, yet I never found any interesting article like yours. {It's|It is} pretty worth enough for me. {In my opinion|Personally|In my view}, if all {webmasters|site owners|website owners|web owners} and bloggers made good content as you did, the {internet|net|web} will be {much more|a lot more} useful than ever before.|
I {couldn't|could not} {resist|refrain from} commenting. {Very well|Perfectly|Well|Exceptionally well} written!|
{I will|I'll} {right away|immediately} {take hold of|grab|clutch|grasp|seize|snatch} your {rss|rss feed} as I {can not|can't} {in finding|find|to find} your {email|e-mail} subscription {link|hyperlink} or {newsletter|e-newsletter} service. Do {you have|you've} any? {Please|Kindly} {allow|permit|let} me {realize|recognize|understand|recognise|know} {so that|in order that} I {may just|may|could} subscribe. Thanks.|
{It is|It's} {appropriate|perfect|the best} time to make some plans for the future and {it is|i
@eznj
eznj / star_wars.ino
Last active September 26, 2023 18:24
Arduino Star Wars Song
const int c = 261;
const int d = 294;
const int e = 329;
const int f = 349;
const int g = 391;
const int gS = 415;
const int a = 440;
const int aS = 455;
const int b = 466;
const int cH = 523;
@kaworun
kaworun / consumer.txt
Created February 2, 2013 11:36
Twitterのコンシューマーキーらしきもの
Twitter for Android
Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys
Twitter for iPhone
Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU
@petecoop
petecoop / compareimage.php
Last active May 16, 2023 08:53
Using PHP's GD library compares the similarity between 2 images with the same dimensions. This is based on the colour's in spread out positions and returns a rating out of 100.
<?php
function compareImages($imagePathA, $imagePathB, $accuracy){
//load base image
$bim = imagecreatefromjpeg($imagePathA);
//create comparison points
$bimX = imagesx($bim);
$bimY = imagesy($bim);
$pointsX = $accuracy*5;
$pointsY = $accuracy*5;
$sizeX = round($bimX/$pointsX);
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 3, 2024 19:09
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a