Skip to content

Instantly share code, notes, and snippets.

@nijssen
nijssen / FIRRTL_npp.xml
Created June 6, 2020 05:53
FIRRTL syntax highlighting for Notepad++ (Notepad Plus Plus)
<!--
To install me, go to Language, User Defined language, Define your language.
Then, click the "Import..." button and browse to where you saved this file.
Pro-tip: you can also paste the Raw link from this Gist into the file name box and it'll download the file automatically.
Disclaimer: this file may be wrong or otherwise not to your liking. Also, FIRRTL changes from time to time; this was written for FIRRTL 1.3.0
-->
<NotepadPlus>
<UserLang name="FIRRTL" ext="fir" udlVersion="2.1">
<Settings>
@nijssen
nijssen / wdyt_autosave.js
Created March 17, 2019 01:19
WDYT auto-save
// ==UserScript==
// @name WDYT auto-save
// @namespace http://tampermonkey.net/
// @match https://www.applyweb.com/eval/new/student
// @require https://code.jquery.com/jquery.js
// @grant none
// ==/UserScript==
(function() {
@nijssen
nijssen / makeclasssearch
Created March 7, 2019 20:17
UCSC class search creator
#!/usr/bin/perl
use strict;
use warnings;
use WWW::Mechanize;
use List::MoreUtils qw/:all/;
use JSON qw/encode_json/;
use constant PISA_URL => "https://pisa.ucsc.edu/class_search/index.php";
@nijssen
nijssen / peoplesoft_cs_calendar.js
Last active January 11, 2018 07:23
Generates a vCalendar file from PeopleSoft Campus Solutions "my class schedule".
// ==UserScript==
// @name Portal Events finder
// @namespace http://www.bevroren.com/
// @version 0.1
// @description Transfers events from the portal page to google calendar
// @author Thomas Nijssen
// @match https://ais-cs.ucsc.edu/psc/csprd/EMPLOYEE/PSFT_CSPRD/c/SA_LEARNER_SERVICES.SSR_SSENRL_LIST.GBL*
// @match https://ais-cs.ucsc.edu/psc/csprd/EMPLOYEE/HRMS/c/SA_LEARNER_SERVICES.SSR_SSENRL_LIST.GBL*
// @match https://my.ucsc.edu/psc/csprd/EMPLOYEE/PSFT_CSPRD/c/SA_LEARNER_SERVICES.SSR_SSENRL_LIST.GBL*
// @match https://my.ucsc.edu/psc/csprd/EMPLOYEE/HRMS/c/SA_LEARNER_SERVICES.SSR_SSENRL_LIST.GBL*
@nijssen
nijssen / sql.patch
Created April 20, 2015 07:51
Installing Everything: SQL patch
diff -crB eee/everything/Everything/NodeBase.pm everything/Everything/NodeBase.pm
*** eee/everything/Everything/NodeBase.pm 2001-02-18 16:15:40.000000000 -0800
--- everything/Everything/NodeBase.pm 2015-04-19 18:44:34.785225611 -0700
***************
*** 1314,1320 ****
return -1 if($this->tableExists($table));
$result = $this->{dbh}->do("create table $table ($tableid int(11)" .
! " DEFAULT '0' NOT NULL, PRIMARY KEY($tableid))");
@nijssen
nijssen / mod_perl.patch
Created April 20, 2015 07:32
Installing Everything: mod_perl patch
diff -crB apache1/mod_perl-1.31/src/modules/perl/Constants.xs mod_perl-1.31/src/modules/perl/Constants.xs
*** apache1/mod_perl-1.31/src/modules/perl/Constants.xs 2003-03-13 20:39:39.000000000 -0800
--- mod_perl-1.31/src/modules/perl/Constants.xs 2015-04-19 22:49:07.370809012 -0700
***************
*** 20,26 ****
SvPVX(caller), sub, SvPVX(pclass), sub);
#endif
gv = gv_fetchpv(form("%_::%s", caller, sub), TRUE, SVt_PVCV);
! GvCV(gv) = perl_get_cv(form("%_::%s", pclass, sub), TRUE);
GvIMPORTED_CV_on(gv);
@nijssen
nijssen / apache.patch
Created April 20, 2015 07:29
Installing Everything: Apache patch
diff -crB apache1/apache_1.3.9/src/main/http_protocol.c apache_1.3.9/src/main/http_protocol.c
*** apache1/apache_1.3.9/src/main/http_protocol.c 1999-08-14 02:21:19.000000000 -0700
--- apache_1.3.9/src/main/http_protocol.c 2015-04-12 19:08:54.437509643 -0700
***************
*** 659,665 ****
* then the actual input line exceeded the buffer length,
* and it would be a good idea for the caller to puke 400 or 414.
*/
! static int getline(char *s, int n, BUFF *in, int fold)
{