Skip to content

Instantly share code, notes, and snippets.

View martin12333's full-sized avatar

Martin Milan martin12333

View GitHub Profile
@martin12333
martin12333 / wifi-field
Created January 27, 2022 16:19 — forked from fredo-dedup/wifi-field
Calculating WIFI propagation with IJulia
{
"metadata": {
"language": "Julia",
"name": "WIFI simulation"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@martin12333
martin12333 / LICENSE.txt
Created September 21, 2021 14:26 — forked from tlrobinson/LICENSE.txt
Simple JavaScript REPL for the browser.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Tom Robinson <http://tlrobinson.net/>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@martin12333
martin12333 / bbs.js
Created August 23, 2021 12:20 — forked from TooTallNate/bbs.js
Running a node.js REPL over `curl`
/**
* Requires node v0.7.7 or greater.
*
* To connect: $ curl -sSNT. localhost:8000
*/
var http = require('http')
, repl = require('repl')
, buf0 = new Buffer([0])
@martin12333
martin12333 / observable-style.css
Created August 13, 2021 18:49 — forked from mootari/observable-style.css
Monokai for ObservableHQ
/* ==UserStyle==
@name Monokai for Observable
@namespace github.com/openstyles/stylus
@version 1.0.0
@description Overrides the Observable CodeMirror theme with Monokai.
@author -
==/UserStyle== */
@-moz-document domain("observablehq.com") {
/* Based on Sublime Text's Monokai theme */
@martin12333
martin12333 / SortandSetPath.ps1
Created July 20, 2021 17:36 — forked from kavaliro/SortandSetPath.ps1
A script demonstrating how to sort your path entries via powershell. It's more for show. The last two lines are all that you need to accomplish it. The rest is just how one might get there.
#What's my path?
$env:Path
#How many characters long is my path?
$env:Path.Length
#I want to see each entry separately. I'll save the entries into an array...
$pathEntries = $env:Path.Split(";")
#...and output that array to the commandline.
$pathEntries
#for grins, how many entries in the array?
@martin12333
martin12333 / adb.sh
Created July 18, 2021 17:30 — forked from sofaking/adb.sh
Get battery level via adb
adb shell dumpsys battery | grep level
@martin12333
martin12333 / import_bookmarks_to_evernote.py
Created January 28, 2021 18:22 — forked from richard-to/import_bookmarks_to_evernote.py
Quick and dirty script to import bookmarks into Evernote. Expected bookmarks file is in Delicious format. In my case, I needed to export Diigo bookmarks into Evernote.
from xml.sax.saxutils import escape
from datetime import datetime
from bs4 import BeautifulSoup
headerXml = """<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE en-export SYSTEM "http://xml.evernote.com/pub/evernote-export3.dtd">
<en-export application="Evernote" version="Evernote Mac">"""
footerXml = "</en-export>"
@martin12333
martin12333 / Eclipse.desktop
Created July 16, 2020 13:22
Eclipse launcher for Ubuntu 15.04 with Unity
[Desktop Entry]
Version=1.0
Name=Eclipse
Exec=env UBUNTU_MENUPROXY=0 LIBOVERLAY_SCROLLBAR=0 SWT_GTK3=0 <path to eclipse>/eclipse
Icon=<path to eclipse>/eclipse/icon.xpm
Terminal=false
Type=Application
StartupNotify=true
@martin12333
martin12333 / life.py
Created May 26, 2020 11:41 — forked from teoliphant/life.py
Array-oriented version of the game of life
from numpy.random import rand
from numpy import r_, ix_, uint8, roll
import matplotlib.pyplot as plt
import time
size = 200
GRID = (rand(size,size) > 0.75).astype(uint8)
# Rotate indices because the world is round
indx = r_[0:size]
up = roll(indx, -1)

Writing template strings in Markdown

With template strings coming to ES6, the backtick (`) means something in Markdown and in JavaScript. If you write this:

To display a message, write `alert(`hello world!`)`.

it'll render like this:

To display a message, write alert(hello world!).