Skip to content

Instantly share code, notes, and snippets.

View dungsaga's full-sized avatar
👻
ghost in the machine

DungSaga dungsaga

👻
ghost in the machine
View GitHub Profile
@dungsaga
dungsaga / fix-zimbra-web-client-in-chrome.md
Last active July 11, 2018 09:16
fix "narrow columns" of Zimbra web client in Google Chrome v45

There's a problem when viewing Zimbra web client in Google Chrome v45: The user interface does not fill the whole width of the browser window.

While waiting for Zimbra and Chrome to fix it, we can use this workaround:

  1. open Chrome DevTools (with Ctrl+Shift+J or Command+Option+J)
  2. run this command: $("#skin_td_main").setAttribute('style', 'width: 88%')
  3. close Chrome DevTools (with F12)

Screenshots:

@dungsaga
dungsaga / document.cookie-is-empty.js
Last active February 5, 2016 08:43
reproduce bug "document.cookie is empty if any cookie has non-ASCII characters" (https://code.google.com/p/chromium/issues/detail?id=485035)
@dungsaga
dungsaga / math.sql
Last active December 28, 2015 09:50
obfuscated sql queries
select abs(ceil(round(sin(6)*sin(4)*sin(2)*sin(0)))) = abs(ceil(round(sin(7)*sin(5)*sin(3)*sin(1))))
;
select right(left(right(left(right(left('select',6),5),4),3),2),1)
;
select right(left(right(left(right(left(right(left(right(left(right(left(right(left(right(left(right(left(right(left('select',20),19),18),17),16),15),14),13),12),11),10),9),8),7),6),5),4),3),2),1)
;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Chrome bug 530121</title>
<meta name="viewport" content="initial-scale=1">
</head>
<body>
<div style="transform:scaleX(1); box-shadow:0 0 75px rgba(0,0,0,0.65);" >
<div style="overflow:scroll; height:300px;" >
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@dungsaga
dungsaga / deobfuscate-odttf-in-xps.js
Last active April 3, 2024 09:37
deobfuscate odttf file (extracted from M$ XPS file)
const purpose = "Purpose: deobfuscate odttf file (extracted from M$ XPS file)"
const usage = "Usage: node deobfuscate-odttf-in-xps.js <guid-obfuscated-font-file.odttf> [<output-file.ttf>]"
const obfuscatedStartOffset = 0 //start of obfuscated bytes in font file
const obfuscatedEndOffset = 32 //start of obfuscated bytes in font file
const guidSize = 32 // length of GUID string (only hex characters included)
const fs = require('fs')
const path = require('path')

latest free version of Synergy

  • You can use Barrier which is almost similar to Synergy 1.9. It's actively maintained (receiving bug fixes) as an open source project. But it doesn't have digital certificates on binary releases.
  • You can use Synergy 1.9.0-rc3 or 1.8.8 from some github repository. It's not maintained as Symless is working on Synergy 2.x.

References:

** Rationale for using CPL as an installer format **
An issue with EXE installers is that they are likely to pick up bogus DLLs
from the directory they execute from, which, from security perspective, must
be assumed to be polluted with malicious stuff of all kinds. This holds even
for installers which carefully avoid DLL dependencies to the possible extent,
because the various DLL injection mechanisms built into Windows may introduce
additional dependencies which practically go beyond anyone's control.
https://blogs.msdn.microsoft.com/oldnewthing/20130802-00/?p=3633 provides some
@dungsaga
dungsaga / README.md
Created March 17, 2019 23:29
Candlestick chart demo
@dungsaga
dungsaga / README.md
Last active March 18, 2019 02:35
Line chart with tag cloud