Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# Wayback machine downloader
#TODO: Remove redundancy (download only newest files in given time period - not all of them and then write over them)
############################
clear
#Enter domain without http:// and www.
domain="google.com"
#Set matchType to "prefix" if you have multiple subdomains, or "exact" if you want only one page
matchType="domain"
@lazanet
lazanet / xash3dbuild.sh
Created October 26, 2015 23:42
Xash 3D pull + build (Ubuntu)
#Xash3D pull + build on ubuntu
# by lazanet
###############################
sudo su
apt-get install cmake libc6-dev-i386 g++-4.6-multilib lib32bz2-dev libc6-dev-i386 lib32z1-dev lib32z1 lib32ncurses5 lib32bz2-1.0 libx11-dev xorg-dev
cd /opt
git clone https://github.com/SDLash3D/halflife
#Xash3D pull + build on ubuntu 15.10
# by lazanet
# run with sudo
###############################
clear
rm -rdf dep
mkdir dep
cd dep
@lazanet
lazanet / .emacs
Last active January 6, 2020 17:47
; Various settings:
(package-initialize)
(cua-mode 1) ;; Enable ^Z, ^X, ^C, ^V, select with mouse and shift-cursor-movement
(transient-mark-mode 1) ;; No region when it is not highlighted
(setq cua-keep-region-after-copy t) ;; Standard MS-Windows behaviour
(setq-default line-spacing 1) ;; Add 1 pixel between lines
(recentf-mode) ;; Add menu-item "File--Open recent"
; Define some additional "native-Windows" keystrokes (^tab, Alt/F4, ^A, ^F, ^O,
; ^S, ^W) and redefine (some of) the overridden Emacs functions.
@lazanet
lazanet / LIST.H
Last active September 14, 2017 23:29
bcc3.1 list "template"
#ifndef __LIST_H__
#define __LIST_H__
#include <iostream.h>
#define makeNormalList(type) makeList(List_##type, type)
#define makePointerList(t) makeList(List_pointer##t, t *)
#define makeList(name, type)\
class name {\
sudo apt-get install dosbox
скинути следећи zip и распаковати га на /opt/bc31
https://www.dropbox.com/s/1ql3gyuyxmylfca/bc31.zip?dl=0
Ископирати следећи ред на дно ~/.bashrc
alias dosenv='f(){ unset -f f; dosbox -c "mount c ." -c "mount d /opt/bc31" -c "PATH=%PATH%;D:\BIN" -c "c:" -c "cls" -c "$@" > /dev/null 2>&1 & }; f'
@lazanet
lazanet / bootcampDownloader.js
Created December 14, 2018 14:19
Download mp3's from Bootcamp
// PASTE FOLLOWING LINES IN CONSOLE (CTRL + SHIFT + J), WHILE ON BOOTCAMP PAGE
numSongs = 0;
document.querySelectorAll(".play_status").forEach(function (button) {
button.click();
document.querySelectorAll(".title-col")[numSongs++].innerHTML += "<a href='" + document.querySelector("audio").src + "'>download</a>";
alert("Continue?");
});
if (numSongs == 0) // if it is a single song page
{
@lazanet
lazanet / slideshareDownload.js
Last active February 24, 2022 00:47
Download slides from slideshare
function getHighestResImg(element) {
if (element.getAttribute('srcset')) {
let highResImgUrl = '';
let maxRes = 0;
let imgWidth, urlWidthArr;
element.getAttribute('srcset').split(',').forEach((item) => {
urlWidthArr = item.trim().split(' ');
imgWidth = parseInt(urlWidthArr[1]);
if (imgWidth > maxRes) {
maxRes = imgWidth;
@lazanet
lazanet / main.ts
Created September 10, 2019 20:39
Reupload instagram page backup
/* tslint:disable:no-console */
/*
Reuploads all photos on instagram page from page backup.
(when fascist mods decide that your satire must be hate speech)
sudo apt install node tsc npm
sudo npm install instagram-private-api
then copy your backup to ./backup
ffmpeg -i "concat:$(echo `ls .`|sed 's/ /|/g')" -c copy output.mts
rm 00*.MTS
ffmpeg -i output.mts file.mp4