Skip to content

Instantly share code, notes, and snippets.

View kghbln's full-sized avatar
🐇
Tempus ipsum affert consilium.

Karsten Hoffmeyer kghbln

🐇
Tempus ipsum affert consilium.
View GitHub Profile
@cb99999
cb99999 / jquery-clickable-div.js
Last active December 7, 2018 05:34
jquery -> make entire div a clickable link
<script>
jQuery(document).ready(function($) {
/*----------------------------
make entire div clickable
-----------------------------*/
$(".myBox").click(function(){
window.location=$(this).find("a").attr("href");
return false;
### Keybase proof
I hereby claim:
* I am kghbln on github.
* I am kghbln (https://keybase.io/kghbln) on keybase.
* I have a public key whose fingerprint is 188A 2299 7D2B D982 913D BAE5 3323 8E94 6562 31E7
To claim this, I am signing this object:
@rohityadavcloud
rohityadavcloud / my.cnf
Created July 27, 2015 10:19
Example MySQL my.cnf optimized
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
# This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
syslog
<!--
This is a sample application that shows how to use the Pageview API.
Read more here: https://wikitech.wikimedia.org/wiki/Analytics/AQS/Pageview_API
The most important code is inside the updateChart function, towards the end of the file.
The rest of the code is just html, css and input setup.
Disclaimer: This is just sample code, it has not been tested in all browsers/devices.
Distributed under the Unlicense: http://unlicense.org/
-->
@azizur
azizur / Creating a static copy of a dynamic website.md
Last active June 3, 2024 09:39
Creating a static copy of a dynamic website

The command line, in short…

wget -k -K -E -r -l 10 -p -N -F --restrict-file-names=windows -nH http://website.com/

…and the options explained

  • -k : convert links to relative
  • -K : keep an original versions of files without the conversions made by wget
  • -E : rename html files to .html (if they don’t already have an htm(l) extension)
  • -r : recursive… of course we want to make a recursive copy
  • -l 10 : the maximum level of recursion. if you have a really big website you may need to put a higher number, but 10 levels should be enough.
anonymous
anonymous / -
Created August 17, 2017 21:31
System: Host: pandorea Kernel: 4.4.0-53-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: Cinnamon 3.2.7 (Gtk 3.18.9-1ubuntu3.3) dm: mdm Distro: Linux Mint 18.1 Serena
Machine: Mobo: ASUSTeK model: B150M-C v: Rev X.0x Bios: American Megatrends v: 2003 date: 09/19/2016
CPU: Quad core Intel Core i5-6500 (-MCP-) cache: 6144 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 25535
clock speeds: min/max: 800/3600 MHz 1: 3299 MHz 2: 3300 MHz 3: 3299 MHz 4: 3300 MHz
Graphics: Card: Intel Sky Lake Integrated Graphics bus-ID: 00:02.0 chip-ID: 8086:1912
Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa)
Resolution: 1920x1080@60.00hz
GLX Renderer: Mesa DRI Intel HD Graphics 530 (Skylake GT2)
anonymous
anonymous / -
Created December 2, 2017 12:38
System: Host: pandorea Kernel: 4.4.0-101-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: Cinnamon 3.6.6 (Gtk 3.18.9-1ubuntu3.3) dm: mdm Distro: Linux Mint 18.3 Sylvia
Machine: Mobo: ASUSTeK model: B150M-C v: Rev X.0x Bios: American Megatrends v: 2003 date: 09/19/2016
CPU: Quad core Intel Core i5-6500 (-MCP-) cache: 6144 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 25535
clock speeds: min/max: 800/3600 MHz 1: 3299 MHz 2: 3300 MHz 3: 3300 MHz 4: 3300 MHz
Graphics: Card: Intel Sky Lake Integrated Graphics bus-ID: 00:02.0 chip-ID: 8086:1912
Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa)
Resolution: 1920x1080@60.00hz
GLX Renderer: Mesa DRI Intel HD Graphics 530 (Skylake GT2)
@dweldon
dweldon / install-docker.sh
Last active April 8, 2022 11:18
Install docker CE on Linux Mint 18.3
#!/usr/bin/env bash
# https://docs.docker.com/install/linux/docker-ce/ubuntu/
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"
sudo apt-get update
sudo apt-get install docker-ce
# https://docs.docker.com/compose/install/
@ilhooq
ilhooq / importWikispaces.php
Last active September 26, 2018 15:28
Import wiki from WikiSpaces to MediaWiki
<?php
/**
* Import pages from Wikispaces
*
* ======================================================================
*
* To use this script, put it in your MediaWiki 'maintenance' folder
* Then call the script on the command line.
*
* Examples of use :
@s7eph4n
s7eph4n / List format overhaul.md
Last active February 28, 2024 00:58
List format overhaul: Change description

List format overhaul: Change description

Changes Overview

  • Wrapped components of the list format in HTML elements
  • Added class attributes to HTML elements of list, ol and ul formats to facilitate styling
  • Added plainlistformat
  • template format becomes alias of the plainlist format