Skip to content

Instantly share code, notes, and snippets.

View acrnms.txt
AFAIK =» As Far As I Know
AFK =» Away From Keyboard
ASAP =» As Soon As Possible
BAS =» Big A$$ Smile
BBL =» Be Back Later
@rmm5t
rmm5t / benchmark_local_var_vs_instance_var.rb
Created Jun 18, 2019
Benchmark local var caching vs direct method access
View benchmark_local_var_vs_instance_var.rb
require 'benchmark'
require 'active_support/all'
Source = Struct.new(:value, keyword_init: true)
def local_var_test(source)
value = source.value
return if value.nil?
value
end
View gist:cafab719f8fd25dfcafb2a7d0d27e1ae
Verifying my Blockstack ID is secured with the address 1GDA7SdRsi7ijNBHNRpm6BjzZb9d3BNzhY https://explorer.blockstack.org/address/1GDA7SdRsi7ijNBHNRpm6BjzZb9d3BNzhY
View exemplar.md

Exemplar - run ASHLAR on demo data with the batch script

  1. Download FIJI and put it in C:\Users\Public\Downloads\

  2. Save the imagej_basic_ashlar.py to C:\Users\Public\Downloads\Fiji.app\plugins\

  3. Launch command prompt

  4. In command prompt, change directory to the demo data folder

@rust-play
rust-play / playground.rs
Created Jun 18, 2019
Code shared from the Rust Playground
View playground.rs
use std::env;
use std::fs::File;
use std::io;
use std::io::Read;
use std::path::Path;
fn read_file(path: &Path) -> io::Result<String> {
let mut file = File::open(path)?;
let mut s = String::new();
file.read_to_string(&mut s).map(|_| s)
@Const-me
Const-me / wpf-window-message-hook.cs
Created Jun 18, 2019
Subclassing WPF window to handle custom messages
View wpf-window-message-hook.cs
using System;
using System.Windows;
using System.Windows.Interop;
static class SubclassWindow
{
// Call this from the constructor of your main window. SourceInitialized event is raised long after the constructor.
public static void initialize( Window wnd )
{
wnd.SourceInitialized += ( object sender, EventArgs e ) => sourceInitialized( wnd );
View gist:704d1ac85ec43148a6685e8dc4fa16a6
8.0K /nix/store/53pdkwrx3vkaqia07bimdr63j5y2hj1n-yarn-1.17.0/bin
12K /nix/store/53pdkwrx3vkaqia07bimdr63j5y2hj1n-yarn-1.17.0/libexec/yarn/bin
5.1M /nix/store/53pdkwrx3vkaqia07bimdr63j5y2hj1n-yarn-1.17.0/libexec/yarn/lib
5.1M /nix/store/53pdkwrx3vkaqia07bimdr63j5y2hj1n-yarn-1.17.0/libexec/yarn
5.1M /nix/store/53pdkwrx3vkaqia07bimdr63j5y2hj1n-yarn-1.17.0/libexec
5.1M /nix/store/53pdkwrx3vkaqia07bimdr63j5y2hj1n-yarn-1.17.0
View gist:114482b05382923d5d9805719fa275d5
/nix/store/53pdkwrx3vkaqia07bimdr63j5y2hj1n-yarn-1.17.0
├── bin
│   ├── yarn -> /nix/store/53pdkwrx3vkaqia07bimdr63j5y2hj1n-yarn-1.17.0/libexec/yarn/bin/yarn.js
│   └── yarnpkg -> /nix/store/53pdkwrx3vkaqia07bimdr63j5y2hj1n-yarn-1.17.0/libexec/yarn/bin/yarn.js
└── libexec
└── yarn
├── bin
│   ├── yarn
│   ├── yarn.cmd
│   ├── yarn.js
@trendy-weshy
trendy-weshy / world.geojson
Created Jun 18, 2019
my personal helper in maps problem
View world.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lrybak
lrybak / ui-lovelace.yaml
Created Jun 18, 2019
SDM530 ui-lovelace.yaml
View ui-lovelace.yaml
- type: vertical-stack
cards:
- type: entities
title: 'Licznik energii'
show_header_toggle: false
entities:
- entity: sensor.energy_daily_g11
- entity: sensor.energy_daily_g12w
- entity: sensor.energy_monthly_g11
- entity: sensor.energy_monthly_g12w
You can’t perform that action at this time.