Skip to content

Instantly share code, notes, and snippets.

View JemiloII's full-sized avatar

Brian Jemilo II JemiloII

View GitHub Profile
@JemiloII
JemiloII / loaders.py
Created May 13, 2023 18:51
Posting my loaders.py for a PR I'm testing.
# Copyright 2023 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
<DefaultPrices>
<MarketItem>
<TypeId>MyObjectBuilder_Component</TypeId>
<SubtypeName>ZoneChip</SubtypeName>
<Quantity>100000</Quantity>
<SellPrice>1147</SellPrice>
<BuyPrice>1000</BuyPrice>
<IsBlacklisted>false</IsBlacklisted>
</MarketItem>
<MarketItem>
@JemiloII
JemiloII / updateModList.js
Last active July 10, 2020 17:28
Update AoH Modlist Collection.
/*
Run this script on
https://steamcommunity.com/sharedfiles/managecollection/?id=2033309240
*/
const bulklist = `
`;
const list = bulklist.split(/\n/).filter(a => a !== '').map(a => a.trim());
@JemiloII
JemiloII / crunchyrollMangaBetaKeyboardControls.js
Created August 29, 2016 04:45
Keyboard controls for Crunchyroll's manga reader beta. I could have used Es6 easy, however, this should be good for majority of browsers. :)
function loadScript(url, callback){
var script = document.createElement("script");
script.type = "text/javascript";
if (script.readyState){ // IEvil
script.onreadystatechange = function () {
if (script.readyState === "loaded" || script.readyState === "complete"){
script.onreadystatechange = null;
callback();
}
@JemiloII
JemiloII / botasana.js
Created August 10, 2016 04:59
botasana question 3, injected moment.js, removed disable on test. Gets 6/6 and hidden 1/6. Presumes test times out due to moment loading.
var moment = function () { 'use strict';
var hookCallback;
function utils_hooks__hooks () {
return hookCallback.apply(null, arguments);
}
function setHookCallback (callback) {
hookCallback = callback;
@JemiloII
JemiloII / question.js
Created June 17, 2016 21:46
What's the point of creating a null function and then overriding it?
//What's the point of creating a null function and then overriding it?
'use strict';
function a () {
var result = {};
result.__proto__.show = function () {
return null;
}
result.show = function (param) {
return foo(param);
}
@JemiloII
JemiloII / dabblet.css
Last active March 28, 2016 21:26
Make div with bottom triangle (SO)
/**
* Make div with bottom triangle (SO)
* http://stackoverflow.com/questions/12251149/make-div-with-bottom-triangle/
*/
html { background: darkgrey; }
.box {
box-sizing: border-box;
position: relative;
width: 200px;
height: 50px;
@JemiloII
JemiloII / addParentReferenceToChildObjects.js
Created January 8, 2016 17:07
Adds a parent property to the children objects in-order to traverse the child objects back to their parents.
/*
* Adds a parent property to the children objects in-order to traverse the child objects back to their parents.
*
* Example of input parent array:
* [
* {
* name: 'yumiko',
* children: [
* {
* name: 'sally',
// include https://cdn.rawgit.com/ramda/ramda/master/dist/ramda.min.js
// var _ = require('ramda');
var foo = _.curry(function (a, b){
return a + b;
});
var bar = foo(2); //=> function(b){ return 2 + b; }
bar(3); //=> 5
@JemiloII
JemiloII / colorlogger.js
Last active August 29, 2015 14:13
Logging with color
var colors = require('colour'),
setTheme = ['silly', 'input', 'verbose', 'prompt', 'info', 'data', 'help', 'warn', 'debug', 'error'];
colors.setTheme({
silly: 'rainbow',
input: 'grey',
verbose: 'cyan',
prompt: 'grey',
info: 'green',
data: 'grey',
help: 'cyan',