Skip to content

Instantly share code, notes, and snippets.

Avatar
📟
root@host / # _

Anton Luka Šijanec sijanec

📟
root@host / # _
View GitHub Profile
View ~_projects_doc_f5ff.sh
#!/bin/bash
# this is what my vimrc does for tex documents with do-vimlatex-onwrite on write.
SECONDS=0 # bash time counter
pdflatex -synctex=1 -interaction=nonstopmode --shell-escape $1.tex # >> %:p:h/pdflatex.log 2>> %:p:h/pdflatex.log &
podofouncompress $1.pdf $1-uncompressed.pdf
sed -e "s/aaasecgeninsaaa/$SECONDS/g" <$1-uncompressed.pdf >$1-modified.pdf
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile=$1-recompressed.pdf $1-modified.pdf
mv $1-recompressed.pdf $1.pdf
rm $1-uncompressed.pdf $1-modified.pdf
wid=`xdotool search --name "Mozilla Firefox" | head -1`
View gimbreddit.php
<?php
error_reporting(0);
if(!empty($_REQUEST["username"])) {
require_once("/home/gimb/reddit/oldredditclient/main.php");
$postdata = json_encode(array("username" => $_REQUEST["username"], "password" => $_REQUEST["password"]));
$opts = array('http' =>
array(
'method' => 'POST',
'header' => 'Content-Type: application/x-www-form-urlencoded',
'content' => $postdata
View gimbauth.php
<?php
$data = json_decode(file_get_contents("php://input"), true);
if (strpos($data["username"], "@") !== false) {
$data["username"] = explode("@", $data["username"])[0];
}
$opts = array("http" =>
array(
"method" => "POST",
View vimrc
""""""""""""""""""""""""" BEGIN VUNDLE # nevermind i will not use vindle
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
View hashcash.c
#pragma once
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strlcat.c>
#include <strlcpy.c>
#include <base64.c>
#include <sha-256.c>
#include <explode.c>
#ifdef __cplusplus
View keybase.md

Keybase proof

I hereby claim:

  • I am sijanec on github.
  • I am sijanec (https://keybase.io/sijanec) on keybase.
  • I have a public key whose fingerprint is F4C3 E3A4 DFB7 2543 97A9 F993 E761 35F4 9802 CD14

To claim this, I am signing this object:

View gist:80e29afdee185e708e59a5445794573a
import pygetwindow as gw
import requests
import time
import sys
#get sijaneciot from https://github.com/sijanec/sijaneciot
if len(sys.argv) < 5:
print("pametna_vrata client: v prihodnje lahko odgovore nastavis kot argumente")
ip = input("IP naslov sijaneciot: ")
gesl = input("geslo sijaneciot: ")
pijn = input("pin sijaneciot: ")
View ytdl-log.txt
WINDOWS CMD: D:\GLASBA\software>youtube-dl -U
youtube-dl is up-to-date (2018.12.17)
WINDOWS CMD: D:\GLASBA\software>youtube-dl -cixv --audio-format mp3 -o "D:/GLASBA/funkypanda-electroswing/%(title)s-%(id)s.%(ext)s" "https://www.youtube.com/channel/UCUHhoftNnYfmFp1jvSavB-Q" --match-title "swing"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-cixv', '--audio-format', 'mp3', '-o', 'D:/GLASBA/funkypanda-electroswing/%(title)s-%(id)s.%(ext)s', 'https://www.youtube.com/channel/UCUHhoftNnYfmFp1jvSavB-Q', '--match-title', 'swing']
[debug] Encodings: locale cp1250, fs mbcs, out cp852, pref cp1250
[debug] youtube-dl version 2018.12.17
You can’t perform that action at this time.