Skip to content

Instantly share code, notes, and snippets.

View gudata's full-sized avatar
🏢
Working from office

gudata

🏢
Working from office
View GitHub Profile
@gudata
gudata / conver-tomboy-notes.py
Created January 21, 2023 12:39
Conver the tomboy notes xml files to markdown format
import os
import xml.etree.ElementTree as ET
import re
directory = "./"
output_directory = "./markdown"
def read_file_as_string(file_path):
with open(file_path, "r") as file:
return file.read()
http://archive.ubuntu.com/ubuntu/pool/universe/c/chntpw/chntpw_140201-1_amd64.deb
@gudata
gudata / WireGuard_Setup.txt
Created December 16, 2021 17:59 — forked from chrisswanda/WireGuard_Setup.txt
Stupid simple setting up WireGuard - Server and multiple peers
Install WireGuard via whatever package manager you use. For me, I use apt.
$ sudo add-apt-repository ppa:wireguard/wireguard
$ sudo apt-get update
$ sudo apt-get install wireguard
MacOS
$ brew install wireguard-tools
Generate key your key pairs. The key pairs are just that, key pairs. They can be
@gudata
gudata / linux
Last active December 13, 2021 21:00
c3pool
quick method is run ipcs -m to list all apps sharing memory. Do this before running XMRIG. Then ipcrm to remove tho
https://xmrig.com/docs/miner/hugepages
[ 0.000000] Linux version 5.4.0-72-generic (buildd@lcy01-amd64-019) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #80-Ubuntu SMP Mon Apr 12 17:35:00 UTC 2021 (Ubuntu 5.4.0-72.80-generic 5.4.101)
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.4.0-72-generic root=/dev/mapper/MAIN-Main ro
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Hygon HygonGenuine
[ 0.000000] Centaur CentaurHauls
[ 0.000000] zhaoxin Shanghai
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
@gudata
gudata / postgresql-set-id-seq.sql
Created March 31, 2021 16:22 — forked from henriquemenezes/postgresql-set-id-seq.sql
PostgreSQL set Next ID Sequence Value to MAX(id) from Table
-- Get Max ID from table
SELECT MAX(id) FROM table;
-- Get Next ID from table
SELECT nextval('table_id_seq');
-- Set Next ID Value to MAX ID
SELECT setval('table_id_seq', (SELECT MAX(id) FROM table));
@gudata
gudata / application_helper.rb
Created December 26, 2020 18:31
current_item
# Usage
# current_item('public')
# current_item(:public)
# current_item('public#dashboard')
# current_item(['settings#private', 'settings#mail'])
# current_item([['settings, 'private']', ['settings', ['mail']])
# current_item([[:settings, :private]', [:settings, [:mail]])
NavActiveClasses = current_hash = {
'aria-current': 'page',
'class': 'active'
@gudata
gudata / apigateway-dynamo_serverless.yml
Created November 25, 2020 14:50 — forked from chris/apigateway-dynamo_serverless.yml
Serverless Framework config file for creating API Gateway to DynamoDB proxy
service: my-api
org: CompanyName
# You can pin your service to only deploy with a specific Serverless version
# Check out our docs for more details
# frameworkVersion: "=X.X.X"
frameworkVersion: '>=2.1.1 <3.0.0'
custom:
defaultStage: dev
@gudata
gudata / keybase.md
Created September 27, 2020 16:48
keybase.md

Keybase proof

I hereby claim:

  • I am gudata on github.
  • I am gudata (https://keybase.io/gudata) on keybase.
  • I have a public key ASCT_tE4KgyeMRIAM0Qk5BIuLJWTkQWispj1RFCPkXZrjAo

To claim this, I am signing this object: