Skip to content

Instantly share code, notes, and snippets.

View sheeeng's full-sized avatar
🌊
It's Monday! \(〇_o)/

Leonard Sheng Sheng Lee sheeeng

🌊
It's Monday! \(〇_o)/
View GitHub Profile
diff --git a/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp b/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp
index c039cb2..d88e78c 100644
--- a/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp
+++ b/tests/auto/widgets/dialogs/qfontdialog/tst_qfontdialog.cpp
@@ -216,24 +216,24 @@ void tst_QFontDialog::testNonStandardFontSize()
QEXPECT_FAIL("", "Fail using QTest::keyClick() to OSX font dialog helper, see QTBUG-24321 case.", Continue);
#endif
- QFontDialog dialog;
- dialog.setOption(QFontDialog::DontUseNativeDialog);
@sheeeng
sheeeng / gist:9803997
Last active August 29, 2015 13:57
Autotest results for https://codereview.qt-project.org/81611 commit to resolve http://bugreports.qt-project.org/browse/QTBUG-10317 case. See https://gist.github.com/sheeeng/9803985 gist for the patch to improve previously flaky autotest.
------------------------------------------------------------------------
for i in {0..99} ; do
make
./tst_qfontdialog -xml -v1 | tee -a tst_qfontdialog.xml
done
------------------------------------------------------------------------
grep -rinA2 'setNonStandardFontSize' tst_qfontdialog.xml > grep_tst_qfontdialog.log
@sheeeng
sheeeng / version-of-mingw.bat
Created May 5, 2014 13:40
Windows batch file to determine MinGW version information. Copied from http://forums.codeblocks.org/index.php/topic,9054.msg65050.html page. Credits to both authors.
@echo off
REM version-of-mingw.bat
REM Credit to Peter Ward work in ReactOS Build Environment RosBE.cmd it gave me a starting point that I edited.
::
:: Display the current version of GCC, ld, make and others.
::
REM %CD% works in Windows XP, not sure when it was added to Windows
REM set MINGWBASEDIR=C:\MinGW
set MINGWBASEDIR=%CD%
@sheeeng
sheeeng / grepmacnetworkaddress.sh
Created May 18, 2014 12:35
Grep MAC network address.
grep -rin '[0-9A-F]\{2\}\(:[0-9A-F]\{2\}\)\{5\}' .
@sheeeng
sheeeng / LeakedEmailsYSLM.md
Last active August 29, 2015 14:03
Emails of YSLM / CDTUP / 云数贸 members can be leaked by playing with its Forgot Password page.

Emails of YSLM / CDTUP / 云数贸 members can be leaked by playing with its Forgot Password page.

Follow the below steps.

  1. Go to http://yslm.my or http://yslm.hk page.

  2. Click Forget? link.

  3. Enter any fancy username. E.g. I used john for this demonstration.

  4. You will see the result below.

@sheeeng
sheeeng / ipconfig_findstr.bat
Created July 22, 2014 09:00
Get both IPv4 and IPv6 addresses from ipconfig command alongside findstr command on Windows platform.
ipconfig /all | findstr /i "IPv4 IPv6"
@sheeeng
sheeeng / gist:81a0037a574628c6355e
Created October 7, 2014 09:40
Individual contributor agreement for Qt Open Governance.
CONTRIBUTION AGREEMENT
VERSION 1.1
THIS CONTRIBUTION AGREEMENT (hereinafter referred to as “Agreement”) is executed by you (either an individual or legal entity) (“Licensor”) in favor of Digia Plc and its subsidiaries, an entity incorporated under the laws of Finland and having its principal place of business at Valimotie 21, 00380 Helsinki, Finland, including its Affiliates (“Digia”).
1. DEFINITIONS
In this Agreement (and where the context so permits) the single of the terms defined below shall include the plural and vice versa. The following terms shall have the meanings identified below.
@sheeeng
sheeeng / shims.xml.patch
Created November 12, 2014 09:20
Patch to fix MaxTo issues with wxWindow based applications. E.g. LINE desktop application.
--- shims.xml Wed Nov 12 09:31:14 2014
+++ shims.xml Wed Nov 12 09:31:33 2014
@@ -18,6 +18,7 @@
<process>MediaMonkey (non-skinned)</process>
<process>MediaMonkey</process>
<windowclass>AcrobatSDIWindow</windowclass>
+ <windowclass>wxWindow</windowclass> <!-- wxWidgets -->
</no_subclass>
<ignore>
<!-- taskbar -->
@sheeeng
sheeeng / Writability
Last active August 29, 2015 14:11 — forked from vladocar/Writability
data:text/html;charset=utf-8, <title>Writability</title><body OnLoad='document.body.focus();' contenteditable style="font-size:21px;line-height:1.6;font-family:'Chaparral Pro',Georgia;max-width:21em;margin:0 auto;padding:3rem;background-color:rgb(233,233,225);color:rgb(68,68,68);" spellcheck="false">
@sheeeng
sheeeng / notepad.html
Last active August 29, 2015 14:11 — forked from jdkanani/notepad.html
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`