Skip to content

Instantly share code, notes, and snippets.

View vampy's full-sized avatar

Daniel Butum vampy

View GitHub Profile
#!/usr/bin/env python3
import requests
import sys
import time
import os
from gi.repository import Notify
URL = "http://www.cs.ubbcluj.ro/~avescan/SSVV_2016/Grades/2016_SSVV_AllGrades.xls"
# One time initialization of libnotify
#!/bin/bash
# wait for 500 ms, cuz reasosn
#
"""
Alias pwget on my machine.
wget -U 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4' --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --no-parent
"""
wget -A pdf,zip,ppt,pptx,jpg,png,xls,xlsx,zip -m -p -E -k -K -np --wait=0.5 $@
#!/bin/bash
# Image https://i.imgur.com/bHVoez1.jpg
imageLocation=~/nicolascage.jpg
displayTime=0.60
newNumber (){
number=$(( $RANDOM % 600 + 60 ))
}
while true; do
@vampy
vampy / core-std-set.ml
Last active July 9, 2024 03:14
Example of using Set.Make on tuple int/string in Ocaml with Core.Std (janestreet core).
open Core.Std
(* See https://realworldocaml.org/v1/en/html/data-serialization-with-s-expressions.html
and https://realworldocaml.org/v1/en/html/maps-and-hash-tables.html *)
module IntTuple = struct
type t = int * int
let compare (x0, y0) (x1, y1) =
match Pervasives.compare x0 x1 with
0 -> Pervasives.compare y0 y1
(* Auto-generated code below aims at helping you parse *)
(* the standard input according to the problem statement. *)
(* --- *)
(* Hint: You can use the debug stream to print initialTX and initialTY, if Thor seems not follow your orders. *)
(* lightx: the X position of the light of power *)
(* lighty: the Y position of the light of power *)
(* initialtx: Thor's starting X position *)
(* initialty: Thor's starting Y position *)
@vampy
vampy / MySQL.md
Last active November 25, 2016 15:16
@vampy
vampy / jokes
Created February 14, 2016 15:17
Journalist asks:
-Comrade Stalin, do you have any hobby?
-I collect jokes about me.
-And how many have you collected so far?
-About two and a half gulags
Phone call between a Russian and an Englishman. The Englishman says:
-Listen, I heard it was -60 degrees over there!
-No, it’s about -30.
-But the BBC said -60.
#include <ctime>
#include <string>
class Time
{
public:
static std::string getTime() // in HH:MM::SS
{
std::time_t t = std::time(nullptr);
std::tm *tm = std::localtime(&t);