Skip to content

Instantly share code, notes, and snippets.

@pb24578
pb24578 / ParenthesisSyntax.java
Created January 5, 2019 22:34
A Java class that returns true or false if parenthesis syntax is valid. This assignment was inspired by a programming interview question I received from a technical interview for a developer internship.
public class ParenthesisSyntax {
// returns if the parenthesis syntax is valid
public static boolean isParanthesSyntaxValid(String paranthesis) {
return isFirstLastValid(paranthesis) && areSequencesValid(paranthesis);
}
// return if the first or last character is invalid syntax
private static boolean isFirstLastValid(String paranthesis) {
final int PARANTHESIS_LENGTH = paranthesis.length();
@pb24578
pb24578 / utcsindex.html
Last active August 17, 2018 14:00
An HTML file shown to whomever loads my UTCS website: https://www.cs.utexas.edu/~pb24578/
<html>
<body>
<header>
<title>Pravat Bhusal</title>
<link rel="shortcut icon" href="https://shadowsych.github.io/rsrc/favcon.ico" type="image/x-icon">
</header>
<main>
<div style="position: absolute; top: 50%; left: 50%; transform: translateX(-50%) translateY(-55%);">
<img style="display: block; margin: 0 auto;" src="https://shadowsych.github.io/rsrc/profile_pic.png">
<p style="color: green; text-align: center; font-weight: bold">
@pb24578
pb24578 / websiteRestart.php
Last active July 8, 2018 04:07
A script to restart a website when it's down. Note: Use a cron job to check if the web-server is down every minute.
<html>
<head>
<title>Restart Tool</title>
</head>
<body>
</body>
<footer>
</footer>
</html>
<?php
[bgcolor=#3F3640]
[center]
[icon]https://shadowsych.github.io/rsrc/profile_pic.png[/icon]
[p][color=white][size=200]Welcome![/size][/color][/p]
[p][color=white][size=125]I'm Shadowsych, a frequent programmer and here to help any player, developer, or graphics designer with just about anything. If you have any questions, feel free to message me![/size][/color][/p]
[p][color=white][size=125]I'm also the founder of the [b]Chibi BBCoders[/b] group.[/size][/color][/p]
@pb24578
pb24578 / avatarantirip.as
Last active February 5, 2018 23:29
Actionscript 3.0 avatar anti-rip code for the website http://www.whirled.com/. Put this code below your "Basic Avatar Code" code and add any new player IDs or URLs into the the two arrays.
var playerIdWhiteList :Array = [
2, //add more player IDs into this array
4
];
var urlWhiteList: Array = [
"glowbe.online", //add more URLs into this array
"tensortown.com"
];
var websiteURL:String = loaderInfo.loaderURL;
for(var i:Number = 0; i < urlWhiteList.length; i++) {
@pb24578
pb24578 / furni_toys_antirip.as
Last active February 5, 2018 23:29
Actionscript 3.0 furniture or toy anti-rip code for the website http://www.whirled.com/. Put this code in a new layer below all other layers of your furniture or toy, then add new indexes of profile-ids into the white-list array.
import com.whirled.ControlEvent;
import com.whirled.EntityControl;
import flash.utils.Timer;
import flash.events.TimerEvent;
var whitelist :Array = [
2, // the original creator of the toy
526 // any other player ids you wish to add
];