Skip to content

Instantly share code, notes, and snippets.

@xameeramir
xameeramir / nerdspal-email-confirmation.html
Last active September 17, 2015 10:53
nerdspal confirmation email template
<div id='body' class='container' style='width:80%; margin-left:auto; margin-right:auto; padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px;'>
<img src='https://www.gravatar.com/avatar/7244c6ceacb2e8310d4d5f8d652b0b44'/>
<div style='font-family: Arial; border-color: #bce8f1;'>
<div style='vertical-align:middle; text-align:center;'>
<a style='color: #337ab7; text-decoration: none;' href='{0}'> <h1>
You are so awesome!
</h1>
Public Class ieTools
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function ObjectFromLresult Lib "oleacc" (ByVal lResult As Long, riid As UUID, ByVal wParam As Long, ppvObject As Object) As Long
Private Declare Function RegisterWindowMessage Lib "user32" Alias "RegisterWindowMessageA" (ByVal lpString As String) As Long
Private Declare Function SendMessageTimeout Lib "user32" Alias "SendMessageTimeoutA" (ByVal hWnd As Long, ByVal msg As Long, ByVal wParam As Long, lParam As Object, ByVal fuFlags As Long, ByVal uTimeout As Long, lpdwResult As Long) As Long
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hWnd As Long, ByVal lp
[DllImport("user32.dll", SetLastError = true)]
public static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr childAfter, string className, string windowTitle);
// For Windows Mobile, replace user32.dll with coredll.dll
[DllImport("user32.dll", SetLastError = true)]
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);
@xameeramir
xameeramir / default nginx configuration file
Last active November 11, 2024 18:56
The default nginx configuration file inside /etc/nginx/sites-available/default
# Author: Zameer Ansari
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
@xameeramir
xameeramir / buyer-assist-assignment.js
Created March 15, 2021 18:46
buyer-assist-assignment.js
const myPromise1 = new Promise((resolve, reject) => {
setTimeout(() => {
resolve('myPromise1');
}, 300);
});
const myPromise2 = new Promise((resolve, reject) => {
setTimeout(() => {
resolve('myPromise2');
}, 300);