Skip to content

Instantly share code, notes, and snippets.

@MMarus
MMarus / extractMultipleFilesWithProgress.cs
Created March 10, 2020 14:01
Extract multiple zip files with progress
public static void ExtractZipFiles(List<string> zipFiles, string directory) {
IEnumerable<ZipEntry> zipEntries = null;
foreach (var zipFile in zipFiles) {
using (var zip = Ionic.Zip.ZipFile.Read(zipFile)) {
zipEntries = zipEntries != null ? zipEntries.Concat(zip.Entries) : zip.Entries;
}
}
int progress = 0;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
//import javax.ws.rs.QueryParam;
import org.jboss.resteasy.annotations.jaxrs.QueryParam;
@Path("/")
public class RESTEASY2105Resource {
@Path("a")
@GET
@MMarus
MMarus / youtube_related.user.js
Created April 24, 2018 17:17 — forked from v31l/youtube_related.user.js
Remove Spam Recommended Videos from YouTube video page
@MMarus
MMarus / kt.kt
Created September 3, 2017 20:26
kt
db.child("goals").orderByChild("performer").equalTo(mFirebaseAuth.currentUser?.uid).addListenerForSingleValueEvent(
object : ValueEventListener {
override fun onDataChange(dataSnapshot: DataSnapshot) {
// Get user information
dataSnapshot.children.forEach { i -> test(i)}
}
override fun onCancelled(databaseError: DatabaseError) {
}
@MMarus
MMarus / kt
Created September 3, 2017 20:25
sample
db.child("goals").orderByChild("performer").equalTo(mFirebaseAuth.currentUser?.uid).addListenerForSingleValueEvent(
object : ValueEventListener {
override fun onDataChange(dataSnapshot: DataSnapshot) {
// Get user information
dataSnapshot.children.forEach { i -> test(i)}
}
override fun onCancelled(databaseError: DatabaseError) {
}
@MMarus
MMarus / data.json
Created September 3, 2017 14:15
goals
"goals": {
"user1": {
"goal1": {
"name": "zhubnout",
"completed": false,
"coaches": {
"participant2": true
},
"creationDate": 1459361875666,
"completionDate": 1459361875666,
# /**
# * @File Makefile
# * @Author Jiri Jaros, Vojtech Nikl, Marta Cudova
# * @Affiliation FIT, Brno University of Technology
# * @Email [email protected], [email protected], [email protected]
# * @Comments Linux makefile for Salomon
# *
# * @Tool ARC project 2017
# * @Created 15 February 2015, 15:25
# * @LastModif 22 February 2017, 16:00
# /**
# * @File Makefile
# * @Author Jiri Jaros, Vojtech Nikl, Marta Cudova
# * @Affiliation FIT, Brno University of Technology
# * @Email [email protected], [email protected], [email protected]
# * @Comments Linux makefile for Salomon
# *
# * @Tool ARC project 2017
# * @Created 15 February 2015, 15:25
# * @LastModif 22 February 2017, 16:00
bindsym Control+mod1+l exec i3lock -c 000000
bindsym XF86AudioRaiseVolume exec amixer -q set Master 5%+ unmute
bindsym XF86AudioLowerVolume exec amixer -q set Master 5%- unmute
bindsym XF86AudioMute exec amixer -q set Master toggle
bindsym XF86MonBrightnessUp exec xbacklight -inc 10 # increase screen brightness
bindsym XF86MonBrightnessDown exec xbacklight -dec 10 # decrease screen brightness
# Media player controls