Skip to content

Instantly share code, notes, and snippets.

Avatar
👀
go work()

Marin Basic MarinX

👀
go work()
View GitHub Profile
@MarinX
MarinX / main.go
Created Nov 4, 2021
Algo: Binary Search
View main.go
package main
import "fmt"
func main() {
cases := []struct {
Input []int
Target int
Output int
}{
@MarinX
MarinX / additional_scripts.html
Created Jan 24, 2020
Add video to Thank You Page on Shopify
View additional_scripts.html
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function() {
var element = document.createElement('div');
element.style.cssText = "margin-bottom: 10px";
// Insert iframe video here
element.innerHTML = `
`;
var sectionNode = document.querySelector('.section__content');
sectionNode.before(element);
@MarinX
MarinX / theme.liquid.html
Created Jan 8, 2020
Shopify Reading Time Tracker - push GA events for articles
View theme.liquid.html
{% if article %}
<script type="text/javascript">
(function () {
var articleName = "{{article.title}}";
//IMPORTANT! Change this to the class name of the div article content
var articleContent = "blog__article__content";
//IMPORTANT!
@MarinX
MarinX / ajax-cart.js
Last active Nov 13, 2021
Shopify free shipping motivator
View ajax-cart.js
function calculateShipping(cart) {
// if total is more than > 50, we have a free shipping
// change me to some number
var FreeShippingPrice = 50;
$(".cart-info").remove();
if (!cart) {
return;
}
var showText = function (text) {
View gist:e905846d863a4645f663822b04623d69
Verifying my Blockstack ID is secured with the address 1DcU9EK8yqYHYuHdwpKxipZzCUWiU7ABD3 https://explorer.blockstack.org/address/1DcU9EK8yqYHYuHdwpKxipZzCUWiU7ABD3
View gist:d74499e48b0a2667cb0ed228acf0dc84
Verifying my Blockstack ID is secured with the address 1DcU9EK8yqYHYuHdwpKxipZzCUWiU7ABD3 https://explorer.blockstack.org/address/1DcU9EK8yqYHYuHdwpKxipZzCUWiU7ABD3
View blockstackid
Verifying that "1DcU9EK8yqYHYuHdwpKxipZzCUWiU7ABD3.id" is my Blockstack ID. https://onename.com/1DcU9EK8yqYHYuHdwpKxipZzCUWiU7ABD3
View geth167.log
=== RUN TestBackendTestSuite
=== RUN TestJailWhisper
{"callbacks":[],"filterId":"dac04ce00b8456a13d0f33d71871ac5dfa625b27613e34f4cd0113de5cb3d223","getLogsCallbacks":[],"implementation":{},"options":{"key":"0x0490161b00f2c47542d28c2e8908e77159b1720dccceb6393d7c001850122efc3b1709bcea490fd8f5634ba1a145aa0722d86b9330b0e39a8d493cb981fd459da2","sig":"0x04eedbaafd6adf4a9233a13e7b1c3c14461fffeba2e9054b8d456ce5f6ebeafadcbf3dce3716253fbc391277fa5a086b60b283daf61fb5b1f26895f456c2f31ae3","topics":["0xe16b462b"],"type":"asym"},"pollFilters":[],"requestManager":{"polls":{},"provider":{},"timeout":null}}
--- PASS: TestJailWhisper (9.00s)
backend_jail_test.go:686: test 0: ensure correct version of Whisper is used
backend_jail_test.go:686: test 1: encrypted signed message from us (From != nil && To != nil)
backend_jail_test.go:686: test 2: encrypted signed message to yourself (From != nil && To != nil)
backend_jail_test.go:686: test 3: signed (known sender) broadcast (From != nil && To == nil)
backend_jail_test.go:6
View gist2.log
INFO [08-01|10:54:41] Starting peer-to-peer node instance=StatusIM/v0.9.8-unstable/linux-amd64/go1.8.3 caller=node.go:169 fn=github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/node.(*Node).Start
INFO [08-01|10:54:41] Allocated cache and file handles database=/home/marin/Projects/go/src/github.com/status-im/status-go/.ethereumtest/Ropsten/StatusIM/lightchaindata cache=16 handles=16 caller=database.go:69 fn=github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/ethdb.NewLDBDatabase
INFO [08-01|10:54:41] Initialised chain configuration config="{ChainID: 3 Homestead: 0 DAO: <nil> DAOSupport: true EIP150: 0 EIP155: 10 EIP158: 10 Engine: ethash}" caller=backend.go:79 fn=github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/les.New
INFO [08-01|10:54:41] Disk storage enabled for ethash caches dir=/home/marin/Projects/go/src/github.com/status-im/status-go/.ethereumtest/Ropsten/StatusIM/ethash count=3 caller=ethash.go:362 fn=github.com
View 192.log
INFO [07-31|09:15:29] Starting peer-to-peer node instance=StatusIM/v0.9.8-unstable/linux-amd64/go1.8.3 caller=node.go:169 fn=github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/node.(*Node).Start
INFO [07-31|09:15:29] Allocated cache and file handles database=/home/marin/Projects/go/src/github.com/status-im/status-go/.ethereumtest/Ropsten/StatusIM/lightchaindata cache=16 handles=16 caller=database.go:69 fn=github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/ethdb.NewLDBDatabase
INFO [07-31|09:15:29] Initialised chain configuration config="{ChainID: 3 Homestead: 0 DAO: <nil> DAOSupport: true EIP150: 0 EIP155: 10 EIP158: 10 Engine: ethash}" caller=backend.go:79 fn=github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/les.New
INFO [07-31|09:15:29] Disk storage enabled for ethash caches dir=/home/marin/Projects/go/src/github.com/status-im/status-go/.ethereumtest/Ropsten/StatusIM/ethash count=3 caller=ethash.go:362 fn=github.com