Skip to content

Instantly share code, notes, and snippets.

View ialexs's full-sized avatar

ilya alexander s ialexs

View GitHub Profile
@ialexs
ialexs / PDFCreator_EmailAllResponses
Created August 31, 2023 06:38 — forked from andrewroberts/PDFCreator_EmailAllResponses
Google Apps Script to create a PDF from each of the rows in a Google Sheet
/*
PDF Creator - Email all responses
=================================
When you click "Create PDF > Create a PDF for each row" this script
constructs a PDF for each row in the attached GSheet. The value in the
"File Name" column is used to name the file and - if there is a
value - it is emailed to the recipient in the "Email" column.
@ialexs
ialexs / ia-create-contactprint.sh
Created December 3, 2022 09:16
Create contact-print from a directory of images
#!/bin/env bash
#
# Create a contact print from a dir of JPGs
#
# /ialexs Sat 03 Dec 2022 09:08:24 AM WIB
#Show message if no arguments are given
if [ $# -eq 0 ]; then
echo -e "\nCreate contact print from a directory."
echo -e "\n- Dir must contain only image file\n- Dir & file name must be in a *nix friendly format"
@ialexs
ialexs / get_twitpic.sh
Created October 28, 2022 07:27
extract twitpic.com from own twitter archive
#!/bin/env bash
# Dirty regex. Problem? lmao
# Use at your own risk /ialexs
# Extract twitpic.com URL from tweets.js
< tweets.js grep full_text | \
grep -Eo 'http://twitpic.com/.*' | \
sed -e 's/["|,]//g' | \
sed -e 's/ http/\nhttp/g' | \
sed -e's/ /,/g' | cut -d, -f 1 | tee url-twitpic-only.csv
@ialexs
ialexs / cut4twitter.sh
Last active October 11, 2022 07:27
cut for twitter
# cut4twitter
# cut video for twitter upload. because we bored.
# from here and there
function cut4twitter {
source=$1; start=$2; end=$3
file=$(echo $1 | cut -d. -f1)
ext=$(echo $1 | cut -d. -f2)
@ialexs
ialexs / pseudo_bcaEstatement_to_df
Last active September 5, 2022 11:13
pseudo code bca estatement to pdf
## pseudo code/flow BCA billing statement to dataframe/csv/xlsx
### convert pdf from bca to text
`pdftotext -layout file.pdf file.txt`
information:
1) line 1 to 18 = account informatoin
1) line 18 to (end - 5) = resume account (consist five columns)
@ialexs
ialexs / .bash_aliases_docker
Created March 7, 2022 10:08
docker aliases
# docker related
alias dde='echo "docker die exited"; docker rm $(docker ps -a -q -f status=exited)'
alias docker-die-exited='docker rm $(docker ps -a -q -f status=exited)'
alias docker-die-network='docker network ls ; docker network prune -f ; echo -e "mampuss..done. \n\nSisa default: "; docker network ls'
alias docker-die-stop-kill-all='docker stop $(docker ps -q); docker volume prune ; docker-die-exited ; docker-die-network'
alias dpsa='docker ps -a'
# docker-ips : list docker ips
# https://gist.github.com/ipedrazas/2c93f6e74737d1f8a791
@ialexs
ialexs / google-sheets-json.py
Created July 27, 2021 04:23 — forked from nickjevershed/google-sheets-json.py
Python script to convert Google spreadsheets to simple JSON file and save it locally. Assumes your data is on the left-most sheet, ie the default. Spreadsheet needs to be 'published to the web'.
import simplejson as json
import requests
#your spreadsheet key here. I'm using an example from the Victorian election campaign
key = "1THJ6MgfEk-1egiPFeDuvs4qEi02xTpz4fq9RtO7GijQ"
#google api request urls - I'm doing the first one just to get nice key values (there's probably a better way to do this)
url1 = "https://spreadsheets.google.com/feeds/cells/" + key + "/od6/public/values?alt=json"
@ialexs
ialexs / netflix genre code
Created June 21, 2021 09:40
netflix genre code
No,GENRE,SUBGENRE,URL
1,Anime,Anime,https://netflix.com/browse/genre/7424
2,Anime,Adult Animation,https://netflix.com/browse/genre/11881
3,Anime,Anime Action,https://netflix.com/browse/genre/2653
4,Anime,Anime Comedies,https://netflix.com/browse/genre/9302
5,Anime,Anime Dramas,https://netflix.com/browse/genre/452
6,Anime,Anime Features,https://netflix.com/browse/genre/3063
7,Anime,Anime Sci-Fi,https://netflix.com/browse/genre/2729
8,Anime,Anime Horror,https://netflix.com/browse/genre/10695
9,Anime,Anime Fantasy,https://netflix.com/browse/genre/11146
@ialexs
ialexs / column_name.txt
Created March 5, 2021 04:56
Google Meet audit log columns
1: Date
2: Event Name
3: Event Description
4: Meeting Code
5: Participant Identifier
6: Participant Outside Organisation
7: Client Type
8: Organizer Email
9: Product Type
10: Duration
" minimalist vim
:set cursorcolumn cursorline " set cursor column
colorscheme elflord
:set number relativenumber
:augroup numbertoggle
: autocmd!
: autocmd BufEnter,FocusGained,InsertLeave * set relativenumber