Skip to content

Instantly share code, notes, and snippets.

@shivendra14
shivendra14 / multithread.cpp
Created September 14, 2017 17:48
A simple multi threaded cpp-11 code
#include <iostream>
#include <string>
#include <vector>
#include <atomic>
#include <thread>
#include <future>
template <class F>
void par_for(int begin, int end, F fn) {
@shivendra14
shivendra14 / RUN_LOG_EMAIL.py
Last active July 6, 2018 17:04
Python script to run an exe, capture the logs and email them as attachment
#
#Revision-1
#Author: Shivendra Agarwal
#Year: 2018
#Title: Python script to run an executable, capture the logs and email them as attachment
#
# Script to run the tests
import subprocess, sys
def IsPlatformWin():
@shivendra14
shivendra14 / Illustrator_Scale_Artboard_and_Artwork.jsx
Last active May 22, 2023 16:37
Illustrator_Scale_Artboard_and_Artwork
#target Illustrator
var requiredABsize = 1700; //px
var activeDoc = app.activeDocument;
var abActive = activeDoc.artboards[ activeDoc.artboards.getActiveArtboardIndex() ];
var abProps = getArtboardBounds(abActive);
var scale = findRequiredScale(abProps);
if (scale > 1)
@shivendra14
shivendra14 / Illustrator_Scale_Artboard_and_Artwork.jsx
Created September 17, 2017 14:19
Script to scale up Illustrator Assets
#target Illustrator
/*
Revision-1
Author: Shivendra Agarwal
Year: 2017
Title: Script to scale-up artwork and artboard above 15 Mpixel
*/
if ( app.documents.length > 0 )
alert("ERROR: \n Close all documents before running this script." );