Skip to content

Instantly share code, notes, and snippets.

@akshithg
akshithg / neo4j_switch_db.sh
Created October 3, 2023 23:55
Switch neo4j db on community edition
#!/usr/bin/env bash
set -eu
to=$1
active=$(cat /etc/neo4j/neo4j.conf | grep "initial.dbms.default_database" | cut -d'=' -f2)
echo "changing from *$active* to *$to*"
sudo sed -i "s/initial.dbms.default_database=$active/initial.dbms.default_database=$to/g" /etc/neo4j/neo4j.conf
@akshithg
akshithg / large_matrix.txt
Created March 7, 2023 05:41
Cases of non-determinism in the kernel
---#
arch/x86/kernel/process.c:119
---
static int set_new_tls(struct task_struct *p, unsigned long tls)
{
struct user_desc __user *utls = (struct user_desc __user *)tls;
if (in_ia32_syscall()) ## x ##
return do_set_thread_area(p, -1, utls, 0);
else
@akshithg
akshithg / Blockstack ID
Created August 7, 2019 19:58
Blockstack ID
Verifying my Blockstack ID is secured with the address 12M3oyd497SG2hza6vyPakhPgNhbDcSe5p https://explorer.blockstack.org/address/12M3oyd497SG2hza6vyPakhPgNhbDcSe5p
@akshithg
akshithg / nconnect.py
Created September 15, 2018 22:58
python nc
#!/usr/bin/env python
import socket
class NConnect:
def __init__(self, host, port):
self.host = host
self.port = port
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
Verifying my Blockstack ID is secured with the address 1FRwm4jfPt75h5n1PLc1vw3QkdisvyMiLt https://explorer.blockstack.org/address/1FRwm4jfPt75h5n1PLc1vw3QkdisvyMiLt
@akshithg
akshithg / break.py
Created August 4, 2016 13:38
python equivalent of ruby's binding.pry
import code; code.interact(local=dict(globals(), **locals()))

Keybase proof

I hereby claim:

  • I am akshithg on github.
  • I am akshithg (https://keybase.io/akshithg) on keybase.
  • I have a public key whose fingerprint is 834C 7364 4101 0419 80A9 F5BA E224 13D9 9CD4 780D

To claim this, I am signing this object: