Skip to content

Instantly share code, notes, and snippets.

Avatar
🍍
721

Andrew theawesomecoder61

🍍
721
View GitHub Profile
@theawesomecoder61
theawesomecoder61 / compare_hierarchies.py
Last active Aug 10, 2021
compare_hierachies.py: a Cinema 4D script with GUI that compares two hierarchies by name
View compare_hierarchies.py
# compare hierarchies by pineapples721
# tested on C4D R21, should work on >= R19
import c4d
from c4d import gui
dialog = None
def PickSessionEnd(self, active, multi):
global dialog
if dialog.hier == "a":
@theawesomecoder61
theawesomecoder61 / diffchain
Created Mar 3, 2020
HP Prime: Partial derivatives chain rule
View diffchain
// diffchain by pineapples721
// Instructions
// 1. Create a CAS program.
// 2. Conenct your calculator to your PC. Launch the Connectivity Kit.
// 3. Paste this in to the new CAS program.
//2fns, 2vars
#cas
diff22(zfn,xfn,yfn):=
begin
@theawesomecoder61
theawesomecoder61 / base64fonttobin.py
Last active Oct 18, 2017
Converts a text file with Base64 encoded font (like in CSS) to a .bin file to be converted to a font
View base64fonttobin.py
#!/usr/bin/python
# This script converts a font encoded in Base64 in a text file to a .bin font file.
# You can convert the .bin file using http://onlinefontconverter.com/, which I recommend though I am not affiliated.
# It'd be useful to know what the type (TTF, OTF, WOFF, SVG, etc.) the original font was for the online converter.
# tested with Python 2.7
from base64 import decodestring
@theawesomecoder61
theawesomecoder61 / drawarc.lua
Last active May 30, 2020
Draw arcs or pie charts/graphs in Garry's Mod. I did not make this, this is only re-uploaded for archival reasons.
View drawarc.lua
-- Draws an arc on your screen.
-- startang and endang are in degrees,
-- radius is the total radius of the outside edge to the center.
-- cx, cy are the x,y coordinates of the center of the arc.
-- roughness determines how many triangles are drawn. Number between 1-360; 2 or 3 is a good number.
function draw.Arc(cx,cy,radius,thickness,startang,endang,roughness,color)
surface.SetDrawColor(color)
surface.DrawArc(surface.PrecacheArc(cx,cy,radius,thickness,startang,endang,roughness))
end
@theawesomecoder61
theawesomecoder61 / MASDetector.m
Created Oct 20, 2016
A code snippet written in Cocoa (Objective-C) that detects if an application was downloaded from the Mac App Store, that returns as a boolean.
View MASDetector.m
- (BOOL)isFromMAS:(NSURL *)appURL {
bool mas = NO;
if(appURL != nil) {
mas = [[NSFileManager defaultManager] fileExistsAtPath:[[appURL URLByAppendingPathComponent:@"/Contents/_MASReceipt/receipt"] relativePath]];
}
return mas;
}
@theawesomecoder61
theawesomecoder61 / Better_RenWeb.js
Last active Aug 30, 2016
With this script, RenWeb is now faster and cleaner with awesome features.
View Better_RenWeb.js
function createChart(a,b,c,d,e){var f=100,g=(2*Math.PI,d3.scale.linear().domain([0,100]).range([0,2*Math.PI])),h=d3.select("body").select(a).append("svg").attr("width",2*f).attr("height",2*f),i=h.append("g").attr("transform","translate("+f+", "+f+")"),j=d3.svg.arc().innerRadius(f-10).outerRadius(f).startAngle(0).endAngle(g(d));i.append("path").attr("d",j).style("fill",b),i.append("text").text(c).attr("x",0).attr("y",-16).attr("class","classname link").style("fill",b).on("click",function(){window.open(e)}),i.append("text").text(d+"%").attr("x",0).attr("y",32).attr("class","grade link").style("fill",b).on("click",function(a){d3.select(this).text()==numberToLetterGrade(d)?d3.select(this).text(d+"%"):d3.select(this).text(numberToLetterGrade(d))})}function addStyle(a){var b=document.createElement("link");b.rel="stylesheet",b.href=a,document.getElementsByTagName("head")[0].appendChild(b)}function addScript(a,b){var c=document.createElement("script");c.src=a,c.onload=b,document.getElementsByTagName("head")[0].append
@theawesomecoder61
theawesomecoder61 / Slither.io Mod
Last active Jun 13, 2016
From some Chrome extension I found
View Slither.io Mod
var renderMode = 2,
version = '6.3',
normalRender = false,
gameFPS = null,
positionHUD = null,
bestscoreHUD = null,
ipHUD = null,
fpsHUD = null,
styleHUD = "color: #FFF; font-family: Consolas, Verdana; font-size: 13px; position: fixed; opacity: 0.35; z-index: 7;",
inpNick = null,
@theawesomecoder61
theawesomecoder61 / YouTube to MP3 Converter
Created Jan 4, 2014
Working YouTube to MP3 Converter working as of January 2014. Enjoy! :)
View YouTube to MP3 Converter
' Just paste this in your form's code and enjoy!
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
WebBrowser1.Navigate("http://www.youtube-mp3.org/")
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If TextBox1.Text.StartsWith("http://www.youtube.com/watch?v=") Then