This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fs = require('fs'); | |
| const JSON5 = require('json5'); | |
| const [file] = process.argv.slice(2); | |
| fs.writeFileSync( | |
| file.replace(/\.json5$/, '.json'), | |
| JSON.stringify( | |
| JSON5.parse( fs.readFileSync(file) ), | |
| null, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Get data | |
| let d = []; | |
| for (const element of document.querySelectorAll(".mn-connection-card")) { | |
| d.push([element.querySelector("a").href, element.querySelector(".mn-connection-card__name").textContent.trim(), element.querySelector(".mn-connection-card__occupation").textContent.trim()]) | |
| } | |
| // Copy data to clipboard | |
| copy(JSON.stringify(d)); | |
| /* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| if (!document.elementsFromPoint) { | |
| document.elementsFromPoint = elementsFromPoint; | |
| } | |
| function elementsFromPoint(x, y) { | |
| var parents = []; | |
| var parent = void 0; | |
| do { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| # Load all SSH keys | |
| ssh-add -A 2>/dev/null; | |
| # Enable colours | |
| ### Terminal | |
| export CLICOLOR=1 | |
| export LSCOLORS=ExFxBxDxCxegedabagacad |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "workbench.colorTheme": "One Dark Pro", | |
| "workbench.iconTheme": null, | |
| "window.zoomLevel": 0, | |
| "editor.fontSize": 14, | |
| "editor.fontFamily": "Monaco, 'Courier New', monospace", | |
| "terminal.integrated.shell.osx": "/usr/local/bin/bash", | |
| "terminal.integrated.fontSize": 14, | |
| "terminal.integrated.fontFamily": "Monaco", | |
| "git.confirmSync": false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "io/ioutil" | |
| "github.com/piprate/json-gold/ld" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re | |
| directory = "query/linkedql/" | |
| with open(directory + "steps.go") as file: | |
| content = file.read() | |
| def convert(name): | |
| s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) | |
| return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from itertools import starmap, chain | |
| def flat_unzip(iterable): | |
| """ | |
| Transforms given iterable of tuples of iterables to tuple of iterables | |
| """ | |
| return starmap(chain, zip(*data)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Sync Pipfile with setup.py dependencies | |
| # Assumptions: | |
| # - You are running in a directory with Pipfile, Pipfile.lock & setup.py | |
| # - Your setup.py calls a function named setup() | |
| # - setup() is called with keyword arguments of install_requires and dependency_links (can be empty lists) | |
| # - All your remote dependencies are HTTPS git | |
| import pipfile | |
| import ast | |
| import json |
NewerOlder