Skip to content

Instantly share code, notes, and snippets.

@nicobo
nicobo / zkgroup.Dockerfile
Created January 16, 2021 13:49
A Dockerile to build libzkgroup on ARM v7
############################
# STAGE 1
# Getting around this bug : https://github.com/docker/buildx/issues/395
# Download files into this temporary image, including .cargo/*
FROM --platform=$BUILDPLATFORM rust:1.49-buster AS rust_fix
RUN apt-get update && \
apt-get install -y git
RUN git clone https://github.com/signalapp/zkgroup.git /usr/src/zkgroup

Keybase proof

I hereby claim:

  • I am nicobo on github.
  • I am nicolabs (https://keybase.io/nicolabs) on keybase.
  • I have a public key ASBWDeuwQ43pJTFkfZOmJs7vM9xnFeDej80ElLrK9yQAUQo

To claim this, I am signing this object:

@nicobo
nicobo / getBluetoothFiles.sh
Created July 16, 2017 11:47
Transfers a batch of files from Bluetooth device to the local computer
#!/bin/sh
#######################
## Transfers a batch of files from Bluetooth device to the local computer.
## Requires obexftp and perl's xpath to be installed.
## This script has been tested on Nokia X3.
#######################
# $srcdir is the directory to transfer to this computer
srcdir="/Carte mémoire/Photos"
@nicobo
nicobo / iframe.html
Last active January 12, 2017 13:18
Automatic redirection of the top window
<html>
<body style="background: orange">
<script type="application/javascript">
function doit() {
top.location.href = "https://www.google.fr";
}
// gives us 10 seconds before redirecting
setTimeout( doit, 10000 );
</script>
</body>
@nicobo
nicobo / tortoisehg.desktop
Created September 22, 2012 11:27
Dolphin service menu for Tortoise HG
[Desktop Entry]
Type=Service
X-KDE-ServiceTypes=KonqPopupMenu/Plugin,inode/directory,all/allfiles
X-KDE-Submenu=Mercurial
Actions=Log;Status;Shelve;Diff;Commit;Add;Revert;Rename;Forget;Remove;Update;Search;Synch;Serve;Clone;Init;Ignore;Guess;Recovery;Repoconfig;Userconfig;Aboutthg;
[Desktop Action Log]
Name=Repository Explorer
Icon=tortoisehg/icons/svg/repobrowse.svg
Exec=thg -R "$(hg root --cwd %f)" --newworkbench
@nicobo
nicobo / GAEventTracker.java
Created April 12, 2012 10:34
Google Analytics OnClick wrapper
package nicommons.android.analytics;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceClickListener;
import android.view.View;
import com.google.android.apps.analytics.GoogleAnalyticsTracker;
import com.google.android.apps.analytics.easytracking.EasyTracker;
@nicobo
nicobo / pre-revprop-change.bat
Created January 25, 2012 23:30
pre-revprop-change hook for svnsync
@ECHO OFF
set user=%3
if /I '%user%'=='syncuser' goto ERROR_REV
exit 0
:ERROR_REV echo "Only the syncuser user may change revision properties" >&2
exit 1
@nicobo
nicobo / SSLHelper.java
Created January 17, 2012 09:35
Helper methods for SSL
package nicobo.ssl;
import java.io.IOException;
import java.net.URL;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.UnrecoverableKeyException;
import java.security.cert.CertificateException;
@nicobo
nicobo / ClientAndServerAuthSSLSocketFactory.java
Created January 17, 2012 09:30
A portable implementation of org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory
package nicobo.ssl;
import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import java.net.URL;
import java.net.UnknownHostException;
import java.security.KeyStore;
import java.security.cert.Certificate;
import java.security.cert.X509Certificate;