Skip to content

Instantly share code, notes, and snippets.

View DrSensor's full-sized avatar

૮༼⚆︿⚆༽つ DrSensor

View GitHub Profile
@DrSensor
DrSensor / app.py
Created November 29, 2016 11:53
Python file module with capability of CLI and REST API
#! /usr/bin/env python
import module1, module2
from bottle import run
run(host='localhost', port='8080')
@DrSensor
DrSensor / tilelayermap.ts
Created July 6, 2017 09:44
Cheatsheet TIle Layer Map
let streetmap = [
"http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
"http://stamen-tiles-{s}.a.ssl.fastly.net/toner/{z}/{x}/{y}.png",
"http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}",
];
let topologymap = [
"http://stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png",
"http://{s}.tile.opentopomap.org/{z}/{x}/{y}.png",
"http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x)",
@DrSensor
DrSensor / leaflet_ionic2.py
Last active July 6, 2017 21:53
[WIP] Helper script for loading Leaflet to Ionic 2
import lxml.html
def add_css_code(webpageString, linkString):
root = lxml.html.fromstring(webpageString)
link = lxml.html.fromstring(linkString).find('.//link')
head = root.find('.//head')
title = head.find('title')
if title == None:
where = 0
else:
@DrSensor
DrSensor / align image.md
Created May 14, 2018 04:58
Markdown Tricks

Aligning Image

Because markdown don't support aligning image, instead of

![example seeing impaired TEXT](httpLinktoPicture.jpg)

you can use <img src="httpLinktoPicture.jpg" alt="example seeing impaired TEXT" />

GIF on how to do it or just the demo

@DrSensor
DrSensor / passwordless SSH.sh
Last active May 14, 2018 06:43
Server Setup 101
sudo ssh-keygen
ssh-add
ssh-copy-id username@IP
@DrSensor
DrSensor / app.py
Created May 14, 2018 06:45
bottle.py setup
#! /usr/bin/env python
import module1, module2
from bottle import run
run(host='localhost', port='8080')
@DrSensor
DrSensor / loader options.js
Created June 8, 2018 23:03
binaryen-loader passes
{
loader: 'binaryen-loader',
options: {
optimization: {
level: 2,
shrinkLevel: 2
},
transformation: {
// https://github.com/WebAssembly/binaryen/blob/master/src/passes/pass.cpp#L67-L126
passes: [
@DrSensor
DrSensor / xorg.conf
Created August 6, 2018 13:47 — forked from emtudo/xorg.conf
Travamento com vídeo Ubuntu 18.04: editar ou criar /etc/X11/xorg.conf
Section "ServerLayout"
Identifier "layout"
Screen 0 "nvidia"
Inactive "intel"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1:0:0"
@DrSensor
DrSensor / Bounty.md
Last active September 11, 2018 02:57
Awesome OSS Funding Work
  • IssueHunt - Anyone can fund any issues on open-source projects with some money which will be distributed to its maintainers and contributors.
  • Bountysource - Users can improve the open-source projects they love by creating/collecting bounties and pledging to fundraisers.
  • Salt - open-source projects can collect monthly contributions from supporters in order to reliably and predictably fund ongoing development.
  • Gitcoin - open source bounties platform on the Ethereum blockchain
@DrSensor
DrSensor / markdown.json5
Last active October 4, 2018 04:40
My VSCode Snippet
{
// Place your snippets for markdown here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"subscript": {
"prefix": "sub",
"body": [
"<sub>$1</sub>"