Skip to content

Instantly share code, notes, and snippets.

View vnl's full-sized avatar
🏠
Working from home

Vivian Lobo vnl

🏠
Working from home
View GitHub Profile
@vnl
vnl / home.xaml
Created September 21, 2015 22:00
<ComboBox Grid.Column="1" x:Name="cmbInterface" ItemsSource="{Binding Interfaces}"
SelectedItem="{Binding SelectedInterface}"/>
<ListBox ItemsSource="{Binding InterfaceDetails}"/>
@vnl
vnl / Home.xaml
Last active September 21, 2015 22:26
<ComboBox Grid.Column="1" x:Name="cmbInterface" ItemsSource="{Binding Interfaces}"
SelectedItem="{Binding SelectedInterface}"/>
<ListBox ItemsSource="{Binding InterfaceDetails}"/>
@vnl
vnl / CheckoutGithubPullRequest
Created March 28, 2017 09:31
Checkout github pull requests locallly
Locate the section for your github remote in the `.git/config` file. It looks like this:
```
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = gitgitgitgit.git
```
Now add the line `fetch = +refs/pull/*/head:refs/remotes/origin/pr/*` to this section.
Kindly change the github url to match your project's URL. It ends up looking like this:
@vnl
vnl / ExcelMultipleWorksheet
Created April 25, 2017 09:49
The following version will first create sheets, then save those as separate files and delete the sheets.
Sub SplitData()
Const NameCol = "Change this to Column ID A or B or C..."
Const HeaderRow = 1
Const FirstRow = 2
Dim SrcSheet As Worksheet
Dim TrgSheet As Worksheet
Dim SrcRow As Long
Dim LastRow As Long
Dim TrgRow As Long
Dim Student As String
@vnl
vnl / Project_Type_Guids
Created May 25, 2017 13:52
This gist provides a list of known project type Guids.
**Project Type Description**|**Project Type Guid**
-----|-----
C#|{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
VB.NET|{F184B08F-C81C-45F6-A57F-5ABD9991F28F}
C++|{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}
F#|{F2A71F9B-5D33-465A-A702-920D77279786}
J#|{E6FDF86B-F3D1-11D4-8576-0002A516ECE8}
JScript|{262852C6-CD72-467D-83FE-5EEB1973A190}
Web Application|{349C5851-65DF-11DA-9384-00065B846F21}
Web Site|{E24C65DC-7377-472B-9ABA-BC803B73C61A}
0499c6f697a433f618a55808577e1a136599bd9aa28662e37eb10ece6989a05baca5618b448c6a990c6ca9b95cd2e54bb005508776e945b8dd4b169f3e0d91e526;Masterlyn
Quoting Brian Kramer on the MSDN forums: https://social.msdn.microsoft.com/forums/vstudio/en-US/1b994ff3-da28-46a8-90ef-6c7fab8dcd21/lpctstr#e4e05bbe-7cb8-4321-97de-fcf1c435952e
LPCTSTR = L‌ong P‌ointer to a C‌onst T‌CHAR STR‌ing (Don't worry, a long pointer is the same as a pointer. There were two flavors of pointers under 16-bit windows.)
Here's the table:
LPSTR = char*
LPCSTR = const char*
LPWSTR = wchar_t*
##### Building Google breakpad
Building Google breakpad on Windows is a very painful experience because the process is not really well documented and, furthermore, building the project on Windows is maintained surprisingly poorly by Google. But don't lose hope, it is still possible to build this thing and here are the instructions:
```
git clone https://chromium.googlesource.com/breakpad/breakpad
cd breakpad
git checkout chrome_64
cd src
git clone https://github.com/google/googletest.git testing
cd ..\..
@vnl
vnl / hashcat_macos.sh
Created August 7, 2018 14:54 — forked from chadmayfield/hashcat_macos.sh
Install Hashcat on macOS
#!/bin/bash
git clone https://github.com/hashcat/hashcat.git
mkdir -p hashcat/deps
git clone https://github.com/KhronosGroup/OpenCL-Headers.git hashcat/deps/OpenCL
cd hashcat/ && make
./hashcat --version
./hashcat -b -D 1,2
./example0.sh
@vnl
vnl / ChromeUpdatesDisabled
Created September 17, 2018 11:00
How to update chrome if disabled by administrator
Step 01. Go to Windows Start Button on the left bottom and Click on Run.
Step 02. Type in regedit on the run.
Step 03. go to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Update
Step 04. Double Click on the UpdateDefault and or other entries
Step 05. Change the value from 0 to 1 for all of the entries