Skip to content

Instantly share code, notes, and snippets.

View lutfiihsan's full-sized avatar

Lutfi Ihsan lutfiihsan

View GitHub Profile
@lutfiihsan
lutfiihsan / File Carver.pl
Created March 5, 2023 17:06 — forked from CirKu17/File Carver.pl
File Carving script
## Originally coded by Trenton (http://www.hackyeah.com/?p=36)
## Amended by CirKu17 ( http://short-circuit.x10.mx )
#!/usr/bin/env perl
use warnings;
use strict;
@ARGV || die "Missing filename argument $!\n";
@lutfiihsan
lutfiihsan / get-working-days.js
Created September 3, 2021 15:25 — forked from shansana/get-working-days.js
JavaScript function to get Working days between 2 days without weekends(Saturday,Sunday) and some custom holidays
var getWorkingDays = function(start,endCount,holidays){
var weekdays = [];
var current = start;
var i = 0;
while(i < endCount){
if (!isWeekEnd(current)) {
weekdays.push(current);
i++;
}
@lutfiihsan
lutfiihsan / Combine Multiple Sheet
Created April 10, 2020 01:48 — forked from mhawksey/gist:2252211
Google Apps Script to combine data from different sheets (used in http://mashe.hawksey.info/?p=13130)
function combineData(){
var doc = SpreadsheetApp.getActiveSpreadsheet();
var sheets = doc.getSheets(); // get all the sheets
var outSheet = doc.getSheetByName("combined"); // set where we want to write the results
for (i in sheets){ // loop across all the sheets
if (sheets[i].getSheetName().substring(0,9) == "followers"){ // if sheetname starts with 'follower' then
var target = sheets[i].getSheetName().substring(12); // extract users name for target column
var data = getRowsData(sheets[i]); // get extisting data from current sheet
for (j in data){
data[j]["target"] = target; // create a target column with the users name