Skip to content

Instantly share code, notes, and snippets.

View applehat's full-sized avatar
✝️
Sola Fide

Cameron Chunn applehat

✝️
Sola Fide
View GitHub Profile
This file has been truncated, but you can view the full file.
@applehat
applehat / nvidia_uncap.sh
Created April 8, 2022 16:08
Unraid User Script for uncapping nvidia GPUs for use in transcoding
#!/bin/bash
echo ""
echo "==== NVENC Session Limit Removal ===="
echo ""
if [ -f "/patch.sh" ]; then
echo "Patch Already found."
else
echo "Patch does not exist -- Downloading"
wget https://raw.githubusercontent.com/keylase/nvidia-patch/master/patch.sh
chmod +x patch.sh
jQuery(document).on("click", "#discountPopupButton" , function(e) {
e.preventDefault();
alert("hello world");
jQuery('#testMessage' ).text('test');//elementor-heading-title
jQuery('.elementor-heading-title' ).text('testing');
jQuery( '.elementor-price-table__integer-part' ).text("nother test");
})
/*
$(document).on("click", "#discountPopupButton" , function() {
//jQuery( '#testButton' ).click(function() { // Binds this function to run when HTML element with id=discount is clicked
### Keybase proof
I hereby claim:
* I am applehat on github.
* I am applehat (https://keybase.io/applehat) on keybase.
* I have a public key ASBvbRdcl-5Fz2bhd0dJoXbZh2Loc1eFhbOHKny5kqpcOgo
To claim this, I am signing this object:
@applehat
applehat / TableCrusher.js
Last active May 9, 2016 21:15
Crush tables that won't get out of the way of themselves.
$(function(){
$("<style type='text/css'> .crushedTable { table-layout:fixed } .crushMe { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; padding: 0 !important; } </style>").appendTo("head");
tableCrusher(); // run first thing, because we dont need a resize to be broken.
var tableCrusherRTime;
var tableCrushertableCrusherTimeout = false;
var tableCrusherDelta = 200;
$(window).resize(function() {
tableCrusherRTime = new Date();
if (tableCrusherTimeout === false) {
87.106.81.107 - - [23/Jan/2013:17:11:55 -0600] "GET /webcalendar/install/index.php HTTP/1.1" 404 2011
87.106.81.107 - - [23/Jan/2013:17:11:55 -0600] "GET /suspended.page/ HTTP/1.1" 200 3448
112.90.138.183 - - [23/Jan/2013:17:13:18 -0600] "GET / HTTP/1.1" 200 116
168.62.202.45 - - [23/Jan/2013:17:13:41 -0600] "GET /men-s-canada-goose-lodge-down-hoody-gray HTTP/1.1" 404 2049
168.62.202.45 - - [23/Jan/2013:17:13:42 -0600] "GET /cgi-sys/defaultwebpage.cgi HTTP/1.1" 200 3477
95.108.150.235 - - [23/Jan/2013:17:14:46 -0600] "GET /robots.txt HTTP/1.1" 404 1977
95.108.150.235 - - [23/Jan/2013:17:14:48 -0600] "GET /cgi-sys/defaultwebpage.cgi HTTP/1.1" 200 1682
<?php
$original = $some_variable;
$length = 100;
echo (strlen($original) > $length)?substr($original,0,$length)."...":$original;
?>
@applehat
applehat / garbage.js
Last active December 14, 2015 01:49
Recursively kill elements in Alloy with Global Function.
Alloy.Globals.gc = function(ob, parent) {
if (ob.children) {
for (var c = (ob.children.length - 1); c >= 0; c--) {
Alloy.Globals.gc(ob.children[c], ob);
}
}
if (parent) {
parent.remove(ob);
ob = null;
}
@applehat
applehat / alloy.js
Last active December 11, 2015 06:28
Alloy.Globals.settings = {}; // Create Empty Object.
/* Settings Getter - Can also just access Alloy.Globals.settings[key] */
Alloy.Globals.settings.get = function(key) {
return Alloy.Globals.settings[key] || null;
}
/* Settings Saver */
Alloy.Globals.settings.set = function(key,value) {
var settings = Alloy.createCollection('settings');
<?php
/* accepts date as a unix timestamp, a string, or empty for today. */
function is_caturday($date=null)
{
if (is_numeric($date) && $date !== null) {
$time = $date;
} elseif($date !== null) {
$time = strtotime($date);