Skip to content

Instantly share code, notes, and snippets.

View davidsylvestre's full-sized avatar

David Sylvestre davidsylvestre

View GitHub Profile
using System;
using System.Collections.Generic;
using System.IO;
using System.Security.Cryptography;
using System.Text;
namespace demo_read
{
class Program
{
##
## Source: https://chris.dziemborowicz.com/blog/2013/05/18/how-to-batch-extract-attachments-from-msg-files-using-powershell/
##
## Instalation:
##
## On Windows Vista and newer, the PowerShell modules folder is typically found here:
## C:\Users\__your_username__\Documents\WindowsPowerShell\Modules
##
## On Windows XP, the PowerShell modules folder is typically found here:
## C:\Documents and Settings\__your_username__\Documents\WindowsPowerShell\Modules
@davidsylvestre
davidsylvestre / git-update-fork.sh
Created September 26, 2017 11:39 — forked from rdeavila/git-update-fork.sh
Git: como atualizar um fork com as mudanças do original?
#!/bin/bash
# Adicione um novo remote; pode chamá-lo de "upstream":
git remote add upstream https://github.com/usuario/projeto.git
# Obtenha todos os branches deste novo remote,
# como o upstream/master por exemplo:
git fetch upstream
xcopy <path to source> <path to destination> /D /S /C /Q /H /R /Y /K
:: https://stackoverflow.com/a/30019017
@echo off
setlocal enableextensions disabledelayedexpansion
(for %%a in (%*) do if exist "%%~a" (
pushd "%%~dpa" && ( copy /b "%%~nxa"+,, & popd )
) else (
type nul > "%%~fa"
)) >nul 2>&1
:: app location
@set pathYoutube="path youtube-dl[optional]"
:: playlist
@set listName="java-tutorial"
:: auth
@set user=""
@set password=""
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
  1. Download the Java 8 SDK for Windows from Oracle. You will get a file named jdk-8u101-windows-x64.exe.
  2. Open the downloaded file with 7-Zip, which will show aa list of files and folders.
  3. Open folder '.rsrc' (select and double click this folder within 7-Zip).
  4. Open folder '1033' (or the folder of greatest size).
  5. Open folder 'JAVA_CAB10' (or the folder of greatest size).
  6. Open file '111' (or the folder of greatest size).
  7. Open file 'tools.zip'.
  8. Extract its contents to a directory where own write permissions, for example: C: \ Users \ Daniel \ Documents \ jdk-8u102-x64. To prevent issues, I recommend a directory without spaces.
  9. From within this directory, search for all .pack files and extract them using unpack2000.exe command line tool found in the bin subdirectory. Following windows prompt command does the trick when executed from within the extracted directory: >for /r %i in (*.pack) do .\bin\unpack200.exe "%i" "%~pi%~ni.jar"