Skip to content

Instantly share code, notes, and snippets.

@egore
egore / RemoveConfluenceAttachments.java
Created Jun 2, 2020
Swing UI to delete attachments from confluence pages in batches
View RemoveConfluenceAttachments.java
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.itextpdf.xmp.impl.Base64;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils;
import javax.net.ssl.HttpsURLConnection;
import javax.swing.*;
import javax.xml.ws.Holder;
import java.awt.*;
View rebuild.php
<?php
declare (strict_types = 1);
/**
* Create SQL scripts to add images to the Wordpress media library. Note that this does not create thumbnails (etc.)
* Run using 'php rebuild.php' in a copy of your wordpress folder
*/
const BASE_URI = 'http://YOUR_IP_OR_HOSTNAME_GOES_HERE/';
function clearname(string $name) {
@egore
egore / rumble.cpp
Last active Jan 23, 2020
SDL 2 based rumble tester I use for PS3 controllers
View rumble.cpp
#include <SDL2/SDL.h>
#include <cstdio>
#include <list>
#include <signal.h>
std::list<std::pair<SDL_Joystick*, SDL_Haptic*>> joysticks;
void shutdown_joysticks() {
SDL_Log("Closing joysticks");
for (std::pair<SDL_Joystick*, SDL_Haptic*> joystick : joysticks) {
@egore
egore / picasa-opencv.py
Created Feb 2, 2019
Read picasa.ini and show the faces detected by picasa using python and opencv
View picasa-opencv.py
import configparser
import cv2
import sys
def coordinates(rect):
'''
Translate encoded coordinates from picasa.ini into number array
'''
# From 'rect64(x)' to 'x'
rect = rect[7:]
View scl011-add-5292-usbid
--- /usr/lib/pcsc/drivers/SCLGENERIC.bundle/Contents/Info.plist 2011-01-17 12:02:25.000000000 +0100
+++ /usr/lib/pcsc/drivers/SCLGENERIC.bundle/Contents/Info.plist 2019-01-09 20:35:49.299937762 +0100
@@ -34,6 +34,7 @@
<string>0x04E6</string>
<string>0x04E6</string>
<string>0x04E6</string>
+ <string>0x04E6</string>
</array>
<key>ifdProductID</key>
View scmccid-wrong-download-aur
--- scmccid/PKGBUILD 2018-05-04 13:38:08.000000000 +0200
+++ scmccid/PKGBUILD 2019-01-09 20:25:02.138243091 +0100
@@ -7,24 +7,17 @@
arch=('i686' 'x86_64')
url="http://support.identiv.com/products/"
license=('custom')
-depends=('pcsclite' 'libusb0')
+depends=('pcsclite' 'libusb-compat')
makedepends=('unzip')
backup=('usr/local/scm/ini/scmccid.ini')
You can’t perform that action at this time.