Skip to content

Instantly share code, notes, and snippets.

View farukterzioglu's full-sized avatar
🎯
Focusing

Faruk Terzioğlu farukterzioglu

🎯
Focusing
View GitHub Profile
@farukterzioglu
farukterzioglu / delete_git_submodule.md
Created February 4, 2021 10:16 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@farukterzioglu
farukterzioglu / nodeos_full_node_setup.txt
Created October 4, 2019 07:53 — forked from cc32d9/nodeos_full_node_setup.txt
nodeos installation with ZFS
apt-get update && apt-get install -y aptitude git lxc-utils zfsutils-linux netfilter-persistent sysstat
# find the partition ID that is linked to the storage serial number.
# This will prevent from losing the partition if disk mapping changes
ls -l /dev/disk/by-id/ | grep sda6
zpool create -f zdata /dev/disk/by-id/wwn-0x600507604092b628236df4851535cef5-part6
## Fixate internal IP address of the container
systemctl stop lxc-net
sed -i -e 's,^.*LXC_DHCP_CONFILE,LXC_DHCP_CONFILE,' /etc/default/lxc-net
@farukterzioglu
farukterzioglu / lenovo_ideapad_330_ubuntu.md
Created July 4, 2019 18:42 — forked from debojyoti/lenovo_ideapad_330_ubuntu.md
Lenovo ideapad 330 (15ARR) ubuntu issues and there solutions

Lenovo ideapad 330 (15ARR) ubuntu issues and their solutions

Issue-1: None of the ubuntu distros are getting installed

Solution: Ubuntu distros lower than 18.10 will not work in this laptop, as minimum kernal version required is 4.18.

So install ubuntu 18.10 / xubuntu 18.10 / lubuntu 18.10 / kubuntu 18.10 in UEFI mode

Issue-2: Wifi is not working

@farukterzioglu
farukterzioglu / btcgui-notes.txt
Created March 19, 2019 14:31 — forked from patterns/btcgui-notes.txt
Documentation from BtcGui on starting up, and the related cert files.
Linux/BSD/POSIX/Source
Run the following command to start btcd:
$ btcd --testnet -u rpcuser -P rpcpass
Copy btcd's autogenerated rpc.cert to ~/.btcwallet/ so btcwallet can securely communicate with btcd over a TLS-encrypted websocket. This step is only necessary for the first time starting btcwallet or if
btcd's autogenerated cert and key are removed and regenerated.
$ mkdir ~/.btcwallet/
$ cp ~/.btcd/rpc.cert ~/.btcwallet/btcd.cert
@farukterzioglu
farukterzioglu / p2sh_pubkey.go
Created September 20, 2018 19:49 — forked from davecgh/p2sh_pubkey.go
P2SH Pubkey
package main
import (
"encoding/hex"
"fmt"
"github.com/btcsuite/btcutil"
. "github.com/btcsuite/btcd/txscript"
)
@farukterzioglu
farukterzioglu / p2sh_multisig_manual.go
Created September 20, 2018 19:49 — forked from davecgh/p2sh_multisig_manual.go
P2SH Multisig Manual
package main
import (
"encoding/hex"
"fmt"
"github.com/btcsuite/btcutil"
. "github.com/btcsuite/btcd/txscript"
)
@farukterzioglu
farukterzioglu / p2sh_multisig_types.go
Created September 20, 2018 19:49 — forked from davecgh/p2sh_multisig_types.go
P2SH Multisig Types
package main
import (
"encoding/hex"
"fmt"
"github.com/btcsuite/btcd/chaincfg"
. "github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcutil"
)
@farukterzioglu
farukterzioglu / btcdwstest.html
Created September 20, 2018 19:48 — forked from davecgh/btcdwstest.html
btcd Browser Websocket Connection Example
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>WebSocket Test</title>
<script language="javascript" type="text/javascript">
var wsUri = 'wss://127.0.0.1:8334/ws';
var rpcUser = "rpcuser";
var rpcPass = "rpcpass";
@farukterzioglu
farukterzioglu / example_txscript_signtxoutput.go
Created September 20, 2018 19:47 — forked from davecgh/example_txscript_signtxoutput.go
Example of signing a transaction using txscript.SignTxOutput.
package main
import (
"encoding/hex"
"fmt"
"github.com/btcsuite/btcd/btcec"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
@farukterzioglu
farukterzioglu / simnetblksubmit.go
Created September 20, 2018 19:46 — forked from davecgh/simnetblksubmit.go
Example of connecting to a simnet btcd instance, manually generating blocks, and submitting them.
package main
import (
"encoding/binary"
"errors"
"io/ioutil"
"log"
"math"
"math/big"
"path/filepath"