Skip to content

Instantly share code, notes, and snippets.

View ibrahimrajabli's full-sized avatar
💭
https://github.com/theriley106/outCaptcha

ibrahimrajabli

💭
https://github.com/theriley106/outCaptcha
View GitHub Profile
#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)
@ibrahimrajabli
ibrahimrajabli / folder_splitter.py
Last active April 19, 2021 06:27 — forked from zupo/folder_splitter.py
Split a folder with many files into subfolders with N files.Usage: python folder_splitter.py path/to/target/folder
# -*- coding: utf-8 -*-
# @author: Peter Lamut
import argparse
import os
import shutil
N = 100 # the number of files in seach subfolder folder
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
public class SendMessage {
public static void sendToTelegram() {
String urlString = "https://api.telegram.org/bot%s/sendMessage?chat_id=%s&text=%s";
@ibrahimrajabli
ibrahimrajabli / MultiExporter.jsx
Created June 3, 2020 05:10 — forked from TomByrne/MultiExporter.jsx
An Illustrator script for exporting layers and/or artboards into separate files (PNG8 / PNG24 / EPS / PDF / SVG / JPG / FXG).See http://www.tbyrne.org/export-illustrator-layers-to-svg-files
// MultiExporter.jsx
// Version 0.1
// Version 0.2 Adds PNG and EPS exports
// Version 0.3 Adds support for exporting at different resolutions
// Version 0.4 Adds support for SVG, changed EPS behaviour to minimise output filesize
// Version 0.5 Fixed cropping issues
// Version 0.6 Added inner padding mode to prevent circular bounds clipping
//
// Copyright 2013 Tom Byrne
// Comments or suggestions to tom@tbyrne.org
@ibrahimrajabli
ibrahimrajabli / server.conf
Created April 29, 2020 19:07 — forked from iliakan/server.conf
Nginx configuration for separated frontend and backend endpoints
upstream example-webpack {
server 127.0.0.1:8080;
}
upstream example-backend {
server 127.0.0.1:3000;
}
server {
listen 80;
@ibrahimrajabli
ibrahimrajabli / replace_smartobject_image.js
Created April 8, 2020 07:11 — forked from laryn/replace_smartobject_image.js
Photoshop script to replace a smart object within a PSD with selected image(s) and save result as a JPG. (Transformations to the smart object will be applied to new images).
// Replace SmartObject’s Content and Save as JPG
// 2017, use it at your own risk
// Via @Circle B: https://graphicdesign.stackexchange.com/questions/92796/replacing-a-smart-object-in-bulk-with-photoshops-variable-data-or-scripts/93359
// JPG code from here: https://forums.adobe.com/thread/737789
#target photoshop
if (app.documents.length > 0) {
var myDocument = app.activeDocument;
var theName = myDocument.name.match(/(.*)\.[^\.]+$/)[1];
var thePath = myDocument.path;
public class Main {
public static void main(String[] args) {
String[] humans = new String[10];
humans[1] = "test";
humans[2] = "test";
humans[3] = "test";
try {
int i = 15;