Skip to content

Instantly share code, notes, and snippets.

@khoazany
khoazany / attestation.txt
Created March 30, 2021 17:55
ZKOPRU trusted setup attestation
I contributed to the ZKOPRU Trusted Setup Multi-Party Ceremony.
The following are my contribution signatures:
Circuit: zk_transaction_3_2
Contributor # 169
Hash: f2260a32 c15791c6 7377ae57 d26f770e
dacda533 bd5bc7b6 499885e5 231d03e7
c2792d6e bfca1721 f678fda8 6a339264
30435eb3 864c4195 27b6945e e64d03ce
@khoazany
khoazany / dump.sh
Created June 3, 2017 09:47
Dump SQL back to Postgres Database
sudo psql -h localhost -U postgres -d symplcms -f ~/symplcms.sql
whereis java
# java: /usr/bin/java /usr/share/java /usr/share/man/man1/java.1.gz
ls -l /usr/bin/java
# lrwxrwxrwx 1 root root 22 Jan 7 06:53 /usr/bin/java -> /etc/alternatives/java
ls -l /etc/alternatives/java
# /etc/alternatives/java -> /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
@khoazany
khoazany / mouse-position.js
Created December 23, 2016 02:32
Log Out Mouse Position When Cliked On SVG
// Write directly on console, don't put on js code
svg.on('mousemove', function () {
x = d3.mouse(this)[0];
y = d3.mouse(this)[1];
});
@khoazany
khoazany / adb-connect.sh
Created December 20, 2016 03:07
Make ADB connect to Wifi to debug Android app through Wifi
cd /Users/viatick/Library/Android/sdk/platform-tools/
./adb connect 192.0.23.40
@khoazany
khoazany / map.html
Created December 10, 2016 09:17
Make Leaflet's marker click work on Ionic
<ion-view>
<ion-content class="slide-in-both-ways" scroll="false">
<!-- Have to put data-tap-disable="true" -->
<div class="g-map-holder" data-tap-disabled="true">
<div id="gMapContent" data-tap-disabled="true"></div>
</div>
</ion-content>
</ion-view>
@khoazany
khoazany / run.sh
Created May 22, 2016 08:36
Solve "failed to find Build Tools revision x.xx" when running React Native app on Android
# Find the corresponding Build Tools version on the list
android list sdk -a
# Install the right version
android update sdk -a -u -t 8
@khoazany
khoazany / createdb-with-locale.sh
Created February 17, 2016 03:08
Create a new PostgreSQL database with UTF8 encoding
#Replace 'symplcms' with the database'name
createdb --template=template0 --locale=en_US.UTF-8 --encoding=UTF8 -U postgres symplcms
@khoazany
khoazany / batch.sh
Created February 13, 2016 10:28
Make PhpPgAdmin works on Ubuntu 14.04
sudo cp /etc/apache2/conf.d/phppgadmin /etc/apache2/conf-enabled/phppgadmin.conf
sudo /etc/init.d/apache2 restart
@khoazany
khoazany / custom.css
Created February 12, 2016 03:31
Manually Hide "Open In New Tab" Button of Lightbox Modal
.lightbox-nav > .btn-group > .btn:nth-child(2) {
visibility: hidden;
width: 0;
padding: 0;
margin: -1px;
}