This file contains 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
CmdUtils.makeSearchCommand({ | |
name: "qrcode", | |
description: "Generates a QR Code from the current document URL or what you've tpyed after the command. Useful to quickly get something onto your phone.", | |
homepage: "http://www.erikdebruijn.nl/", | |
author: {name: "Erik de Bruijn", email: "ubiquity@erikdebruijn.nl"}, | |
license: "GPLv2", | |
takes: {"input": /.*/}, | |
preview: function(pblock, input) { | |
var atext; | |
atext = input.object.html.toString(); |
This file contains 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
<html style="width:100%; height:100%; overflow:hidden"> | |
<body style="width:100%; height:100%; overflow:hidden; margin:0"> | |
<script> | |
function main() { | |
if (WS.scriptVersion(1)) return; | |
WS.displayWarpView() | |
WS.cameraOn(.25, 360, 640); | |
} | |
window.onload = main; | |
</script> |
This file contains 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
#### A faster way to (interactively) delete some messages interactively on the rails console | |
#messages = Message.find(:all,:conditions => ["recipient_id = 3 and updated_at < ?", 20.days.ago]) | |
messages = Message.find(:all,:conditions => ["recipient_id = 3"]) | |
messages.each do |m| | |
input = '' | |
if m.content.include? "also commented on your comment" do | |
m.delete | |
next | |
end | |
puts "#{m.subject} #{m.created_at}" |
This file contains 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
require 'sinatra' | |
require 'socket' | |
server = TCPServer.new 35666 # Server bound to port 35666, just like EE | |
set :port, 8080 | |
hull = 42 | |
shields = 80 |
This file contains 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
#!/usr/bin/node | |
/* | |
This script does four things for Tesla Model S owners: | |
- it helps increase battery longevity | |
- saves money if your utility charges night-time power differently | |
- gives you a more pleasant start of your drive | |
- preheats for you in the morning, no need to open up the App. | |
How? | |
You tell it when it should complete its charge and what percentage. |
This file contains 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
v () { | |
vagrant_commands=(box connect destroy global-status halt help init login package plugin provision rdp reload resume share ssh ssh-config status suspend up version) | |
if [[ ${vagrant_commands[(r)$1]} = $1 ]] | |
then | |
vagrant $* | |
else | |
vagrant ssh -c "$*" | |
fi | |
} |
This file contains 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
#include "settings.h" | |
#include "pins.h" | |
void setup() { | |
// put your setup code here, to run once: | |
Serial.begin(115200); | |
Serial.println("Slave Ultiboard Ready."); | |
pinMode(SAFETY_TRIGGERED_PIN,OUTPUT); | |
pinMode(J25_PIN1,INPUT); | |
pinMode(J25_PIN2,INPUT); |
This file contains 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
--[[ | |
%% autostart | |
%% properties | |
11 value | |
1002 value | |
1003 value | |
1004 value | |
1005 value | |
1006 value | |
1007 value |
This file contains 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
require 'yaml' | |
require 'pp' | |
require 'sinatra' | |
require 'open-uri' | |
require 'json' | |
enable :sessions | |
$config = YAML::load_file('./config.yaml') | |
configure do |
This file contains 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
# ==== The dilemma: security versus access ==== | |
# Nervous writing down your valuable seed phrase on a piece of paper? | |
# But worried that if you don't, you might lose access? | |
# | |
# ==== The easy (risky) way out ==== | |
# Very commonly, people split their seed phrase in x equal parts, however, | |
# THIS IS VERY INSECURE. An attacker that obtains even one split has | |
# significantly easier job of compromising your key and steal to your | |
# crypto assets/currencies. | |
# |
OlderNewer