Skip to content

Instantly share code, notes, and snippets.

View Jacobinoo's full-sized avatar
🎯
Focusing

Jacob Jacobinoo

🎯
Focusing
View GitHub Profile
@Jacobinoo
Jacobinoo / workflow.md
Last active May 27, 2023 14:11
Versioning and Git Workflow

Semantic Versioning

Details:

Versions are denoted using a standard triplet of integers: MAJOR.MINOR.PATCH. The basic intent is that MAJOR versions are incompatible, large-scale upgrades of the API. MINOR versions retain source and binary compatibility with older minor versions, and changes in the PATCH level are perfectly compatible, forwards and backwards.

@Jengas
Jengas / index.php
Last active March 26, 2024 21:40
Discord oauth2 example PHP
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
ini_set('max_execution_time', 300); //300 seconds = 5 minutes. In case if your CURL is slow and is loading too much (Can be IPv6 problem)
error_reporting(E_ALL);
define('OAUTH2_CLIENT_ID', '1234567890');
define('OAUTH2_CLIENT_SECRET', 'verysecretclientcode');
@mokoshalb
mokoshalb / imgtransfer.php
Created January 4, 2018 12:10
3 ways to download and save a remote image on your server using PHP
<?php
/*
In this tutorial I am going to show you some PHP Methods By which you can easily download remote server image on your local server.
Suppose you don't have FTP access of images but you are able to access images via http port and you want to perform bulk image download.
Then these methods are very useful and you can try any of them to download and save a remote images on your server folder.
*/
// Method-1: By using simple copy() function in PHP
copy("REMOTE SERVER IMAGE URL", 'LOCAL SERVER PATH');
// ie:
@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
@nguyenanhtu
nguyenanhtu / SSLXampp.md
Last active January 20, 2024 23:35
Guide to configure SSL in XAMPP for Windows

How to test 'https' in XAMPP for localhost ? I will guide you

Menu

  • Create certificate
  • Config Apache to access https instead of http
  • Config mod rewrite to generate SSL url
  • Config Virtual host to test site

Step 1 : Create certificate

  • Go to your XAMPP installation directory (in my case it’s E:\xampp), figure out apache folder. In this, find & run batch file
@levicook
levicook / gist:4132037
Created November 22, 2012 16:37
modeling friends and calculating mutual friends w/ mongodb
// ------------------------------------------------------------------
// Friend collection, where _id is a user.Id and Friends is a list, of user.Id.
// Note: friending and unfriending is a two step operation in this scheme:
> db.friends.find()
{ "_id" : 1, "friends" : [ 2, 3, 4 ] }
{ "_id" : 2, "friends" : [ 1, 3, 5 ] }
{ "_id" : 3, "friends" : [ 1, 2, 4, 5 ] }
{ "_id" : 4, "friends" : [ 1, 3, 5 ] }
{ "_id" : 5, "friends" : [ 2, 3, 4 ] }