Skip to content

Instantly share code, notes, and snippets.

View ulpian's full-sized avatar
🌃
underwake...

Ulpian Morina ulpian

🌃
underwake...
View GitHub Profile
@ulpian
ulpian / groupArrayElements.ts
Created January 14, 2022 18:54
groupArrayElements in typescript
// groupArrayElements([1, 2, 3, 4, 5], 3);
const groupArrayElements = (
array: Array<number>,
length: number
): Array<Array<number>> => {
const ar: Array<any> = [];
for (let x of array) {
const prevLength: number = ar[x - 2] ? ar[x - 2].length : 0;
const s: number = prevLength !== 0 ? (prevLength * x) - length : 0;
@ulpian
ulpian / openshop.html
Created July 30, 2014 19:41
Openshop: a small html file example of using provapi.js (provenance api)
<html>
<head>
<title>OpenShop</title>
</head>
<body>
<script type="text/javascript" src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="provapi.js">
// available at https://gist.github.com/ulpmori/48ce3850682ba265b79b
</script>
<script type="text/javascript">
@ulpian
ulpian / provapi.js
Created July 30, 2014 19:38
provapi.js: Javascript driver for provenance api (require JQuery for $.ajax)
// Provenance javascript api driver
// needs jquery
Provapi = {
// set functions
auth: function (appname, key, callback) {
// set appname and key
Provapi.name = appname;
Provapi.key = key;
callback(1);
},
@ulpian
ulpian / alb_tpbafk_trsub
Last active December 11, 2015 03:58 — forked from anonymous/gist:4541082
Albanian translation of the TPB: AFK trailer subtitles.
/tc 00:00:14:00 00:00:17:11
Qeveria e ShBA-së
kërcënoi Suedinë me sankcione.
/tc 00:00:17:16 00:00:20:06
-nëse nuk i mbyll uebfaqet fajllshpërndarëse, si
the Pirate Bayi.
/tc 00:00:23:13 00:00:28:04
Procesi gjyqësor kundër themeluesit të