Skip to content

Instantly share code, notes, and snippets.

View SSP6904's full-sized avatar
πŸ’»
Currently on: Visual Studio Code

Shaun Hoffer SSP6904

πŸ’»
Currently on: Visual Studio Code
View GitHub Profile
@SSP6904
SSP6904 / docker-compose.yml
Created March 4, 2024 02:21
Use Debian inside Docker compose
version: '3'
services:
debian:
image: debian:bookworm
restart: always
ports:
- "8000:80"
stdin_open: true
tty: true
@dmdboi
dmdboi / discord-webhook.js
Last active October 19, 2025 23:56
An example gist to send Embed messages via Discord Webhooks
const axios = require("axios")
//An array of Discord Embeds.
let embeds = [
{
title: "Discord Webhook Example",
color: 5174599,
footer: {
text: `πŸ“… ${date}`,
},
@dmdboi
dmdboi / discord_oauth.js
Created September 20, 2020 13:08
Two functions to authenticate a Discord User and get User's data
var axios = require('axios');
var qs = require('qs');
exports.getAccessToken = (code) => {
var data = qs.stringify({
'client_id': '',
'client_secret': '',
'grant_type': 'authorization_code',
'code': code,
'redirect_uri': '',
@umanghome
umanghome / publish.yml
Last active June 20, 2025 13:27
GitHub Action: Generate a build and push to another branch
# .github/workflows/publish.yml
name: Generate a build and push to another branch
on:
push:
branches:
- master # Remove this line if your primary branch is "main"
- main # Remove this line if your primary branch is "master"
jobs:
@MZanggl
MZanggl / bookmark.js
Created May 14, 2020 05:16
inspect-layout (add as bookmark)
javascript: (function() { var styleEl = document.getElementById('css-layout-hack'); if (styleEl) { styleEl.remove(); return; } styleEl = document.createElement('style'); styleEl.id = 'css-layout-hack'; styleEl.innerHTML = '* { background:#000!important;color:#0f0!important;outline:solid%20#f00%201px!important;%20background-color:%20rgba(255,0,0,.2)%20!important;%20}\%20%20%20%20%20*%20*%20{%20background-color:%20rgba(0,255,0,.2)%20!important;%20}\%20%20%20%20%20*%20*%20*%20{%20background-color:%20rgba(0,0,255,.2)%20!important;%20}\%20%20%20%20%20*%20*%20*%20*%20{%20background-color:%20rgba(255,0,255,.2)%20!important;%20}\%20%20%20%20%20*%20*%20*%20*%20*%20{%20background-color:%20rgba(0,255,255,.2)%20!important;%20}\%20%20%20%20%20*%20*%20*%20*%20*%20*%20{%20background-color:%20rgba(255,255,0,.2)%20!important;%20}\%20%20%20%20%20*%20*%20*%20*%20*%20*%20*%20{%20background-color:%20rgba(255,0,0,.2)%20!important;%20}\%20%20%20%20%20*%20*%20*%20*%20*%20*%20*%20*%20{%20background-color:%20rgba(0,255,0,.2)%20!import
@lenivene
lenivene / get_real_ip_cloudflare.php
Last active October 20, 2025 11:30
Get REAL IP in CloudFlare by PHP
<?php
function get_ip(){
if( ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ){
$ip = $_SERVER['HTTP_CLIENT_IP'];
}
elseif( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ){
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
else{
$ip = $_SERVER['REMOTE_ADDR'];
@sreepurnajasti
sreepurnajasti / main.html
Created June 19, 2018 08:27
upload single file from client( jquery, ajax) to server(express, multer)
<!DOCTYPE html>
<html lang="en">
<head>
<title>Upload File</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active October 26, 2025 10:25
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
ADOBE Creative Suite 5 Master Collection
1023-1631-3275-3276-0087-5426
1325-1576-4130-9475-8280-4266
1325-1548-7004-9142-5077-1912
1325-1684-1405-3432-6260-7438
1325-1238-0019-6636-5160-2146
1325-1966-4532-5397-9277-9204
@protrolium
protrolium / YouTube API β€” getting video thumbnail
Created February 5, 2014 19:57
YouTube API β€” getting video thumbnail
Each YouTube video has 4 generated images. They are predictably formatted as follows:
http://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/3.jpg
The first one in the list is a full size image and others are thumbnail images. The default thumbnail image (ie. one of 1.jpg, 2.jpg, 3.jpg) is:
http://img.youtube.com/vi/<insert-youtube-video-id-here>/default.jpg