Skip to content

Instantly share code, notes, and snippets.

View giuseppe998e's full-sized avatar

Giuseppe Eletto giuseppe998e

View GitHub Profile
@giuseppe998e
giuseppe998e / aay.js
Last active September 15, 2021 07:53
Academic Year generator in JS (Start from October)
const academicYear = (firstMonth = 8) => {
const date = new Date(),
year = date.getFullYear(),
start = date.getMonth() > firstMonth
return `${year - !start}/${year + start}`
}
/* const academicYear=(firstMonth=8)=>{const d=new Date(),y=d.getFullYear(),s=d.getMonth()>firstMonth;return `${y-!s}/${y+s}`} */
console.log(`Academic Year: ${academicYear()}`);
@giuseppe998e
giuseppe998e / fliter.js
Last active March 23, 2021 21:33
5 Lines Iterator JS
// Five Lines Iterator [ fliter (╥﹏╥) ]
const fliter = (a, p = 0) => ({
hasNext: () => p < a.length,
next: () => a[p++],
remove: () => a.splice(--p, 1)
})
/* Minified
* const fliter=(a,p=0)=>({hasNext:()=>p<a.length,next:()=>a[p++],remove:()=>a.splice(--p,1)})
*/
@giuseppe998e
giuseppe998e / Dockerfile
Last active September 26, 2021 23:16
Docker Alpine MurMur (Mumble Server) with persistence | Works on RPI (3B tested)
FROM alpine
LABEL maintainer="Giuseppe Eletto <[email protected]>"
# Setup environment
RUN adduser -DHs /sbin/nologin murmur \
&& apk update \
&& apk upgrade \
&& apk add murmur \
&& rm -rf /var/cache/apk/*

Keybase proof

I hereby claim:

  • I am giuseppe998e on github.
  • I am peppe (https://keybase.io/peppe) on keybase.
  • I have a public key ASBBNqjBQjelWJ8BP99gS3SnE6uyypUsh6QtLciG1XPU5Ao

To claim this, I am signing this object: