Skip to content

Instantly share code, notes, and snippets.

View SilverCory's full-sized avatar
❄️
Serve chilled. Carbonated.

Cory Redmond SilverCory

❄️
Serve chilled. Carbonated.
View GitHub Profile
@SilverCory
SilverCory / viewdata.go
Created January 15, 2018 13:06
A ViewData object for gin. Pass objects throughout the context, then pass viewdata to ctx.HTML
package viewdata
import (
"github.com/gin-gonic/gin"
)
type ViewData map[string]interface{}
const DefaultKey = "viewdata.data"
                       (                  ,d                                                  ,d     
            _           ) )               88                                                  88     
         _,(_)._        ((              MM88MMM ,adPPYba, ,adPPYYba, 8b,dPPYba,   ,adPPYba, MM88MMM  
    ___,(_______).        )               88   a8P_____88 ""     `Y8 88P'    "8a a8"     "8a  88     
  ,'__.   /       \    /\_                88   8PP""""""" ,adPPPPP88 88       d8 8b       d8  88     
 /,' /  |""|       \  /  /                88,  "8b,   ,aa 88,    ,88 88b,   ,a8" "8a,   ,a8"  88,    
| | |   |__|       |,'  /                 "Y888 `"Ybbd8"' `"8bbdP"Y8 88`YbbdP"'   `"YbbdP"'   "Y888  
 \`.|                  /                                             88                              
 `. : : / 88 
@SilverCory
SilverCory / stats_display.py
Last active January 9, 2018 21:23
Statistics displaying for spacepools on the raspberry pi.
#!/usr/bin/python
# Created for a Raspberry PI and I2C display.
# Display: https://www.banggood.com/0_96-Inch-4Pin-White-IIC-I2C-OLED-Display-Module-12864-LED-For-Arduino-p-958196.html
import time
import Adafruit_GPIO.SPI as SPI
import Adafruit_SSD1306
@SilverCory
SilverCory / discord_meme_memebers.go
Last active January 1, 2018 04:21
Invite more than 10 members by spamming discord's api.
package main
import (
"fmt"
"io/ioutil"
"net/http"
"strconv"
"time"
)
<?php
/**
* Discord integration
* Author: Shinka
* Copyright 2017 Shinka, All Rights Reserved
*
* License: http://www.mybb.com/about/license
*
*/
@SilverCory
SilverCory / video_info_scape.go
Last active November 6, 2017 04:47
Scrape all the video information from a youtube video and store it in json files.
package main
import (
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"net/http"
"os"
"strconv"
const _cfg = require("./cfg.json");
const _Eris = require("eris");
const request = require("request");
const client = new _Eris(_cfg.token);
function _oHsHITaNeRROR() {
for (let i = 0; i < 50; i++)
try { throw new Error("UH OH SOMETHING WENT WRONG") } catch(e) { console.log(e) };
}

Type Asset:

  {
    "id": 123123123123,
    "name": "asset_key",
    "type": 1
  }
  • ID: The ID of the asset
package main
import "fmt"
// DO NOT READ THIS CODE BEFORE YOU DO THE CHALLENGE!
//
//
// The challenge:
// From 1 to 100;
// for every multiple of 3, print 'fizz'.
URL:
https://discordlist.net/
=================================
Cookies:
__tawkuuid=e::discordlist.net::yPEE+pt8kfnySXloLnPc8xFX1LFI8+2cqMJ94Qcvn7SpTw7Ahhgm3bxUPgcRJgeP::2; PHPSESSID=8cc5j2ap0f3tn7fmlup1q3ffo3; TawkConnectionTime=0; Tawk_58a5e96d69c2661545c0b4c9=vs6.tawk.to::0; _pk_id.1.7484=0f3bc177897800a6.1495860900.1.1495860954.1495860900.; _pk_ref.1.7484=%5B%22%22%2C%22%22%2C1495860900%2C%22https%3A%2F%2Fwww.google.co.nz%2F%22%5D; _pk_ses.1.7484=*
=================================
Referrer:
https://www.google.co.nz/