Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View obinoob's full-sized avatar

Young Padawan obinoob

View GitHub Profile
@obinoob
obinoob / gist:8dac649cdb580e84dda396cefda9f53a
Created May 10, 2019 09:07 — forked from jameswebb68/gist:34ed19ed2b06d99c484b
Synology Active Directory ADS join domain fix (suddenly nas lost connection to domain)
# Your NAS Synology device suddenly lost connection to your Windows Domain Controller, and or intermittent AD connectivity issues.
# Symptoms include but not limited to:
# - Failing to rejoin after removing the account on the Domain.
# - Failing to rejoin without any changes
# - Join attempt results in = "Failed to join the Windows domain. Please check your domain and firewall settings and try again"
# - Synology is joined, but attempting to connect from domain clients results in "There are no logon servers available to service the logon request"
# - This problem happens intermittently, sometimes rebooting the Synology device allows you to rejoin (Not a solution).
# - Sometimes rebooting both Synology device and Domain Controller allows you to rejoin (Not a solution).
# 1st.) *OPTIONAL* Remove the AD Synology device from Avtice Directory Users/Computers.
We need to write a little shell script to wrap wkhtmltopdf in xvfb. Make a file called wkhtmltopdf.sh and add the following:
xvfb-run -a -s "-screen 0 1024x768x24" wkhtmltopdf "$@"
Move this shell script to /usr/local/bin, and set permissions:
sudo chmod a+x /usr/local/bin/wkhtmltopdf.sh
Check to see if it works once again: run
@obinoob
obinoob / gist:c54078f43284678e171fe61ad5065cf8
Last active March 24, 2018 17:36 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Manutenção</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
<?php
// Posts hasMany Images
// Posts hasOne FeaturedImages: where featured image is the first image for that post.
$this->hasOne('FeaturedImages', [
'className' => 'Images',
'foreignKey' => false,
'conditions' => function ($exp, $query) {
$subquery = $query
@obinoob
obinoob / howto-tomato-install-entware.markdown
Created November 25, 2017 18:14 — forked from dferg/howto-tomato-install-entware.markdown
HOWTO: Install entware on Shibby TomatoUSB

Introduction

This howto describes installing entware for the Tomato open-source router firmware.

Requirements

  • USB stick - 1G or more in size
  • USB-capable router running TomatoUSB.

This Howto Was Tested With

# Thanks to this post:
# http://blog.ikato.com/post/15675823000/how-to-install-consolas-font-on-mac-os-x
$ brew install cabextract
$ cd ~/Downloads
$ mkdir consolas
$ cd consolas
$ curl -O http://download.microsoft.com/download/f/5/a/f5a3df76-d856-4a61-a6bd-722f52a5be26/PowerPointViewer.exe
$ cabextract PowerPointViewer.exe
$ cabextract ppviewer.cab