Skip to content

Instantly share code, notes, and snippets.

@visitdigital
visitdigital / webhook.php
Last active September 20, 2022 02:51
Very Simple Facebook Chat Bot PHP Webhook Script Example
<?php
$challenge = $_REQUEST['hub_challenge'];
$verify_token = $_REQUEST['hub_verify_token'];
// Set this Verify Token Value on your Facebook App
if ($verify_token === 'testtoken') {
echo $challenge;
}
$input = json_decode(file_get_contents('php://input'), true);
@iamphilrae
iamphilrae / phpMyAdmin Export Filename Template, Including Date and Time
Last active April 3, 2024 20:30
phpMyAdmin Export Filename Template, Including Date and Time
@DATABASE@__%Y-%m-%d_%H-%M-%S
@davebarnwell
davebarnwell / PHP composer tools.md
Last active May 19, 2024 20:13
Global installation of PHP tools with Composer

Global installation of PHP tools with Composer

To install a composer package globally, you run the usual require command, but with the addition of the global modifier. So to install PHPUnit, you would run:

$ composer global require phpunit/phpunit
$ composer global require phpunit/dbunit
$ composer global require phing/phing
$ composer global require phpdocumentor/phpdocumentor
$ composer global require sebastian/phpcpd
@stefansundin
stefansundin / twitch-extension.lua
Last active November 26, 2023 13:32
VLC playlist parser for Twitch.tv - https://addons.videolan.org/p/1167220/
--[[
Twitch.tv extension v0.0.2 by Stefan Sundin
https://gist.github.com/stefansundin/c200324149bb00001fef5a252a120fc2
The only thing that this extension does is to act as a helper to seek to the
correct time when you open a twitch.tv url that contains a timestamp.
You must have the playlist parser installed as well!
Usage:
1. Install the playlist parser: https://addons.videolan.org/p/1167220/
@munchicken
munchicken / htaccess
Last active December 16, 2022 10:56 — forked from dave1010/htaccess
HTTP Status Cats Apache (htaccess) config
# HTTP Status Cats
# Apache (htaccess) config originally created by @dave1010,
# rebuilt by Sarah Pierce (see modifications section)
# Licensed CC BY 2.0
# Images CC BY 2.0, from GirlieMac's photostream:
# http://www.flickr.com/photos/girliemac/sets/72157628409467125/with/6508023065/
# Usage: copy save this file as .htaccess or add it to your httpd.conf
@Birdie0
Birdie0 / ifttt-webhooks-extended-guide.md
Last active March 6, 2024 13:38
How to use Discord Webhooks

⚠️ This gist is no longer updated! For maintained, improved and even more extended guide click here.


How to use Discord Webhook

It's a JSON

First, learn JSON. It's not programming language, not even close. Just follow syntax rules and you will be fine.

@sofaking
sofaking / adb.sh
Created March 3, 2017 10:48
Get battery level via adb
adb shell dumpsys battery | grep level
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active May 31, 2024 12:46
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@gwagroves
gwagroves / copy_git_diff.sh
Created September 12, 2017 18:14
Copy git modified files to another directory
cp -pv --parents `git diff --name-only master..develop -- source/directory` target/directory
@Marcono1234
Marcono1234 / Decompiling with MCPConfig.md
Last active March 16, 2022 18:29
Decompiling and deobfuscating Minecraft with MCPConfig (https://github.com/MinecraftForge/MCPConfig)

Disclaimer

I don't have much experience with Gradle and just found a way to get MCPConfig to decompile and deobfuscate Minecraft jar files. The described steps might be extremely inefficient and even wrong.

Any feedback is therefore welcome!

Usage

You can use the project MCPConfig-CSV-mappings afterwards to apply CSV mappings, however in that case you have to adjust the indentation used by fernflower as described in the "Usage with MCPConfig" section before using MCPConfig.

  1. Download the latest MCPConfig version from: https://github.com/MinecraftForge/MCPConfig
  2. Look in the versions folder and choose the version you want, in the following called ``, for example 1.13.1