Skip to content

Instantly share code, notes, and snippets.

View Tenrys's full-sized avatar

Bell Tenrys

View GitHub Profile
@IlyaShastin
IlyaShastin / 3DPaintablePanel.lua
Last active December 16, 2020 06:36
Paint 2D in 3D on 2D screen!
if SERVER then return end
vgui.Paint3D = {} -- Table in global vgui table to hold our stuff
vgui.Paint3D.Panels = {} -- Table containing panels to be 3D painted
vgui.Paint3D.Movement = {} -- Table containing panels to be affected by movement
vgui.Paint3D.Cache = {}
--
-- Grab a few important variables for view calc and save them in the global vgui table.
@saitho
saitho / app.ts
Created November 2, 2017 21:11
Node.js Steamstore - Redeem key example
const SteamUser = require('steam-user');
const SteamTotp = require('steam-totp');
const SteamStore = require('steamstore');
const client = new SteamUser();
const steamstore = new SteamStore();
client.logOn({
"accountName": "###username###",
"password": "###password###",
@NanoAi
NanoAi / blargh.lua
Last active March 26, 2018 06:45
rrrrrrrrrreeeeeeeeeeeeee
local TOOL = _G.TOOL -- Luadev makes this need to be _G.TOOL otherwise I'd use TOOL.
local liveLoad = false
local gmodTool = {}
if not TOOL then -- If the TOOL variable is not found settup a new variable.
gmodTool = weapons.Get("gmod_tool")
TOOL = getmetatable(gmodTool.Tool.weld):Create()
TOOL.Mode = "mapdefine"
liveLoad = true -- If the TOOL variable does not exist that means we are live loading.
end
using UnityEngine;
using System;
public class ScreenshotCamera
{
static Vector3 FocusPoint;
static float Aperture = 20.0f;
RealTimeSince timeSinceMessage;
string MessageText;
@twilight-sparkle-irl
twilight-sparkle-irl / rtpin.js
Last active March 8, 2026 00:09
pin retweets on twitter ----> ----> !! YOU NEED TO BE ON THE OLD LAYOUT, GET GoodTwitter !! <---- <----
$(document).ajaxComplete((e, x, o) => {
if (o.url == "https://api.twitter.com/1.1/statuses/retweet.json") {
tweet_id = JSON.parse(x.responseText)['id_str'];
auth_token = JSON.parse(document.querySelector('#init-data').value)['formAuthenticityToken'];
fetch("https://twitter.com/i/tweet/pin", {
body: `authenticity_token=${auth_token}&id=${tweet_id}`,
method: "POST",
headers: {
Accept: "application/json, text/javascript, */*; q=0.01",
"Cache-Control": "no-cache",
@jackfiallos
jackfiallos / Readme.md
Last active July 30, 2024 14:20
Import SSL Comodo cert to AWS Certificate Manager

Install your Comodo Certificates to Amazon AWS

Comodo, the leading Internet Security Provider offers Free Antivirus, SSL Certificate and other Internet Security related products with complete protection. In this post I will walk you through the setup of SSL in Amazon CloudFront (the process is common to all Amazon services)

AWS need that all your certificates are in PEM format. They are two main of encoding certificate:

DER: is a binary encoding of a certificate. Typically these use the file extension of .crt or .cert.

PEM: is a Base64 encoding of a certificate represented in ASCII therefore it is readable as a block of text. This is very useful as you can open it in a text editor work with the data more easily. Comodo certificate are delivered in DER format .crt, so we need to convert them to PEM.

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace Facepunch
{
public class VirtualScroll : MonoBehaviour
{
@IanColdwater
IanColdwater / twittermute.txt
Last active March 8, 2026 00:11
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
--[[---------------------------------------------------------
Promise object definition
-----------------------------------------------------------]]
local PENDING = 0
local RESOLVED = 1
local REJECTED = -1
local Promise = {}
Promise.__index = Promise
function Promise:_New(callback)
@sindresorhus
sindresorhus / esm-package.md
Last active March 11, 2026 01:59
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.