This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while read -r line; do | |
if [[ $line == *"blob id:"* ]]; then | |
# echo "$line" | |
arrIN=(${line//:/ }) | |
blobId=${arrIN[4]} | |
echo "blob id:$blobId" | |
pathx=$(git rev-list --all --objects | grep $blobId) | |
# echo "$pathx" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To get all users' email addresses | |
git shortlog -sne > .gituserlist | |
# To UPDATE all user's email address for a give list | |
# CORRECT NAME <correct_email> INCORRECT NAME <incorrect_email> | |
# Install filter-repo from newren/git-filter-repo and move `git-filter-repo` binary to git-core folder (git --exec-path) | |
git filter-repo --mailmap .gitmailmap --force | |
# To merge other repository's commit into current repo | |
# Make sure both repo's don't have merge conflicting files/folders first |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let options = { "upsert": true, "new": true }; | |
let update = { "$push": { } }; | |
update["$push"]["receipts"] = url; | |
Tran.findByIdAndUpdate(id, update, options, function(err, tran) { | |
if (err) { | |
res.status(500).json({ error: err.message }) | |
} else { | |
res.status(200).json({ message: 'Item pushed successfully.' }); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
doctype html | |
html(lang="en") | |
head | |
title= pageTitle | |
//- link(rel="stylesheet" href="statement.css") | |
style table td { | |
| border: 1px solid black; | |
| } | |
| table { | |
| border: 2px solid #200e91; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const EventEmitter = require('events'); | |
class MyStream extends EventEmitter { | |
constructor() { | |
super(); | |
} | |
write(data) { | |
this.emit('data', data); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
IFS=, | |
str="Item1, Item2" | |
read -ra LIST <<<"$str" | |
for i in "${LIST[@]}"; do echo "$i" | xargs; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Private Const gAttachmentSizeMin As Long = 10240 '10 KB | |
Public Sub Backup_Email(ByRef objMsg As Outlook.MailItem) | |
Dim objOL As Outlook.Application | |
Dim objAttachments As Outlook.Attachments | |
Dim objSelection As Outlook.Selection | |
Dim i As Long | |
Dim lngCount As Long |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Attribute VB_Name = "ModStdIO" | |
Option Explicit | |
Private Declare Function GetStdHandle Lib "kernel32" (ByVal nStdHandle As Long) As Long | |
Private Declare Function ReadFile Lib "kernel32" (ByVal hFile As Long, _ | |
lpBuffer As Any, ByVal nNumberOfBytesToRead As Long, _ | |
lpNumberOfBytesRead As Long, lpOverlapped As Any) As Long | |
Private Declare Function WriteFile Lib "kernel32" (ByVal hFile As Long, _ | |
lpBuffer As Any, ByVal nNumberOfBytesToWrite As Long, _ | |
lpNumberOfBytesWritten As Long, lpOverlapped As Any) As Long |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// util function to convert the input to string type | |
function convertToString(input) { | |
if(input) { | |
if(typeof input === "string") { | |
return input; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<!-- | |
For learning making your language parser, please check the following link: | |
http://notepad-plus-plus.org/features/function-list.html | |
--> | |
<NotepadPlus> | |
<functionList> | |
<associationMap> | |
<!-- langID: | |
L_TEXT: 0 L_PHP: 1 L_C: 2 L_CPP: 3 L_CS: 4 L_OBJC: 5 |
NewerOlder