Skip to content

Instantly share code, notes, and snippets.

View wiserweb's full-sized avatar

wiserweb wiserweb

View GitHub Profile
{
".123" : "application/vnd.lotus-1-2-3",
".3dml" : "text/vnd.in3d.3dml",
".3g2" : "video/3gpp2",
".3gp" : "video/3gpp",
".a" : "application/octet-stream",
".aab" : "application/x-authorware-bin",
".aac" : "audio/x-aac",
".aam" : "application/x-authorware-map",
".aas" : "application/x-authorware-seg",
@wiserweb
wiserweb / Cross Table Drag Drop.html
Created May 21, 2018 22:42 — forked from davemo/Cross Table Drag Drop.html
This works for dragging, dropping table rows between two separate tables across most browsers :)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>untitled</title>
<meta name="generator" content="TextMate http://macromates.com/">
<meta name="author" content="David Mosher">
<!-- Date: 2010-11-18 -->
@wiserweb
wiserweb / minibian-setup.md
Created September 10, 2017 04:08 — forked from robinmonjo/minibian-setup.md
Install + configure minibian from Mac

Prepare SD card

  • Download MiniBian
  • extract MiniBian .img
  • insert SD Card
  • use disk utility to format the card with fat32
  • check from terminal (OSX) which disk the SD Card is using diskutil list
  • unount SD Card: diskutil unmountDisk /dev/diskX where X is what you found out last step
  • copy image to SD Card: sudo dd bs=1m if=<path to the .img file> of=/dev/rdiskX
  • wait until dd is finished
@wiserweb
wiserweb / functions.php
Created May 2, 2017 20:57 — forked from thecodepoetry/functions.php
Change sidebar position for woocommerce products for The7 -Mulltipurpose wordpress them
function change_sidebar_pos() {
$args = array (
'post_type' => 'product',
'post_per_page' => -1
);
query_posts( $args );
while ( have_posts() ) : the_post();
@wiserweb
wiserweb / node6_install.sh
Created December 4, 2016 06:34
nodejs 6 installation script
#!/bin/bash
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
apt-get install -y nodejs
@wiserweb
wiserweb / ca.pem
Created November 28, 2016 04:16
Let's Encrypt CA chain
-----BEGIN CERTIFICATE-----
MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/
MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
DkRTVCBSb290IENBIFgzMB4XDTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVow
PzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDVQQD
Ew5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
AN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmTrE4O
rz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEq
OLl5CjH9UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9b
xiqKqy69cK3FCxolkHRyxXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw
@wiserweb
wiserweb / disable-transparent-hugepages
Created November 22, 2016 20:38
Disable Transparent Huge Pages (THP)
#!/bin/bash
### BEGIN INIT INFO
# Provides: disable-transparent-hugepages
# Required-Start: $local_fs
# Required-Stop:
# X-Start-Before: mongod mongodb-mms-automation-agent
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Disable Linux transparent huge pages
# Description: Disable Linux transparent huge pages, to improve
@wiserweb
wiserweb / mongod.service
Last active November 22, 2016 19:02
mongodb 3.2 systemd startup file with recommended ulimits
[Unit]
Description=High-performance, schema-free document-oriented database
After=network.target
Documentation=https://docs.mongodb.org/manual
[Service]
User=mongodb
Group=mongodb
ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf
LimitFSIZE=infinity
@wiserweb
wiserweb / mongodb_ssl_with_letsencrypt.md
Created November 21, 2016 23:19 — forked from leommoore/mongodb_ssl_with_letsencrypt.md
MongoDB 3.2.x SSL with Letsencrypt

#MongoDB 3.2.x SSL with Letsencrypt Letsencrypt is an initative which aims to increase the use of encryption for websites. It basically allows people to apply for free certificates provided that they prove the they control the requested domain. We will look at the what is needed to secure your MongoDB installation. For more details on setting up a MongoDB server see MongoDB 3.2.x.

##Set the hostname We sould to set the hostname to match the name of the certificate we are going to optain.

sudo hostname mongo0.example.com

Then update the hostname file to set the server name permanently.

@wiserweb
wiserweb / mongodb_3.2.x.md
Created November 21, 2016 23:19 — forked from leommoore/mongodb_3.2.x.md
Mongo 3.2.x

#MongoDB 3.2.x

##Install MongoDB To install MongoDB on ubuntu from precompiled version.

wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1404-3.2.5.tgz
gzip -d mongodb-linux-x86_64-ubuntu1404-3.2.5.tgz
tar -xvf mongodb-linux-x86_64-ubuntu1404-3.2.5.tar

Then check put what is in the bin directory