Skip to content

Instantly share code, notes, and snippets.

@kebien6020
kebien6020 / Unlock Sheet.vba
Last active April 25, 2018 13:55
Force Unlock Excel Sheet
Sub PasswordBreaker()
'Breaks worksheet password protection.
Dim i As Integer, j As Integer, k As Integer
Dim l As Integer, m As Integer, n As Integer
Dim i1 As Integer, i2 As Integer, i3 As Integer
Dim i4 As Integer, i5 As Integer, i6 As Integer
On Error Resume Next
For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66
function* range(...args) {
let start, stop, step
if (args.length === 0) return
if (args.length === 1)
start = 0, stop = args[0], step=1
else
[start, stop, step = 1] = args
int EstimateLastAiredEpisodeNumber(const Item& item) {
// Can't estimate for other types of anime
if (item.GetType() != kTv)
return 0;
// TV series air weekly, so the number of weeks that has passed since the day
// the series started airing gives us the last aired episode. Note that
// irregularities such as broadcasts being postponed due to sports events make
// this method unreliable.
const Date& date_start = item.GetDateStart();
queryInterface.createTable('actions', {
id: {
type: Sequelize.INTEGER,
primaryKey: true,
autoIncrement: true
},
system_id: {
type: Sequelize.STRING,
},
rule_id: {
@kebien6020
kebien6020 / WordExportAsPdf.vba
Last active April 25, 2018 14:04
Word vba macro to instantly export as pdf in the same folder
Sub ExportAsPDF()
'Instantly export as pdf in the same folder
ActiveDocument.ExportAsFixedFormat OutputFileName:= _
Replace(Replace(ActiveDocument.FullName, ".docx", ".pdf"), ".doc", ".pdf"), _
ExportFormat:=wdExportFormatPDF, OpenAfterExport:=False, OptimizeFor:= _
wdExportOptimizeForPrint, Range:=wdExportAllDocument, Item:= _
wdExportDocumentContent, IncludeDocProps:=False, KeepIRM:=True, _
CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _
BitmapMissingFonts:=True, UseISO19005_1:=False
End Sub