Skip to content

Instantly share code, notes, and snippets.

@jhit
jhit / min_duty_cycle_settei.sh
Created November 10, 2023 08:01
Set minimum fan speed on Fujitsu/Kontron motherboards with Teutates BMC
#!/bin/bash
# Copyright (C) 2020 Kia
# Licensed under Zero Clause BSD License
# Copy of original Gist from https://gist.github.com/superbaud/651d898b3958be552e8d3c403c988fad
if [[ $# -ne 3 ]]; then
echo "usage: $0 (BMC I2C BUS NUMBER) (FAN PAGE) (DUTY CYCLE FLOOR)"
echo ""

Link in Template setzen, der die ScrollTo Funktion von Shopware benutzt:

<p>
  <a href="#" 
    data-scroll="true" 
    data-scrollTarget="#category_text">
    Weiter lesen
  </a>
const orgTrigger = document.trigger;
document.trigger = function(eventName, ...args){
console.log(eventName, args);
orgTrigger(eventName, ...args);
};
@jhit
jhit / letsencrypt-for-pure-ftpd.sh
Last active May 20, 2018 10:05
Taken from: https://www.howtoforge.com/community/threads/securing-ispconfig-3-control-panel-port-8080-with-lets-encrypt-free-ssl.75554/page-4#post-357460. What I'm actually using for pure-ftpd at the moment is the below script, run from a cronjob; rather than testing file timestamps it actually compares the certificate serial number handed out b…
#!/bin/bash
# letsencrypt-for-pure-ftpd.sh: compares the ssl certficate/key used by pure-ftpd
# with the current certificate/key issued by letsencrypt and copy the latter
# to the former if they differ.
# this can be run as a cronjob to propogate letsencrypt certificate changes
# to pure-ftpd
PUREFTPD_CERT=/etc/ssl/private/pure-ftpd.pem
@jhit
jhit / domain.conf
Created May 15, 2017 11:11
Nginx Configuration for JTL-Shop 4
user www-data;
worker_processes auto;
pid /run/nginx.pid;
worker_rlimit_nofile 100000;
events {
worker_connections 4096;
multi_accept on;
use epoll;
}
http {
@jhit
jhit / iframe.html
Created September 7, 2016 09:57 — forked from LukeFF/iframe.html
automatic Iframe resizing without Cross-Origin issues
<body onLoad="resizeParent();">
<script type="text/javascript">
function resizeParent() {
var height = document.getElementsByTagName("html")[0].scrollHeight;
window.parent.postMessage(["setIframeHeight", height], "*");
}
</script>
</body>
@jhit
jhit / SwagAboCommerce_detection.php
Created September 1, 2016 13:01
Shopware subscriber to detect if AboCommerce is activated in your template.
<?php
/**
* Adds the variable AboCommerceEnabled to the view
*
* @param Arguments $arguments
*/
public function addAboCommerceData(Arguments $arguments)
{
/** @var \Enlight_Controller_Action $controller */
$controller = $arguments->get('subject');
@jhit
jhit / install-rvm.md
Created September 30, 2012 13:46
Setup RVM/Ruby with PUMA and NGINX on Debian Sqeeze (ISPconfig)

Just some helpful commands to get RVM running on Debian Sqeeze.

Install basic build tools for RVM apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config

Install dependencies to compile the mysql2 gem
apt-get install libmysqlclient-dev

Install dependencies to compile the postgre db gem

@jhit
jhit / README.md
Created September 29, 2012 19:27 — forked from pzol/README.md
RVM + Puma + Ubuntu

Running Puma on Nginx

I use the latest Puma v1.4.0 from rubygems.

Make sure you have nginx installed with these options:

>/opt/nginx/sbin/nginx -V
nginx version: nginx/1.0.15

built by gcc 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)