Skip to content

Instantly share code, notes, and snippets.

#include "DHT.h"
#define DHTPIN 2 // what pin we're connected to
#define DHTTYPE DHT22
float t = 0;
float h = 0;
unsigned long czas;
uint8_t acc = 13;
@Sekhmet
Sekhmet / capture.js
Last active August 29, 2015 14:08
Capture one element
var async = require('async'),
sizes = [
[1280, 720],
];
function capture(sizes, callback) {
var page = require('webpage').create();
page.viewportSize = {
width: sizes[0],
height: sizes[1]
@Sekhmet
Sekhmet / designer.html
Last active August 29, 2015 14:14
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
@Sekhmet
Sekhmet / designer.html
Last active August 29, 2015 14:14
designer
<link rel="import" href="../polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@Sekhmet
Sekhmet / designer.html
Created January 25, 2015 19:58
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
@Sekhmet
Sekhmet / deploy.sh
Last active August 29, 2015 14:23
Deploy many VZ containers from backup.
#!/bin/bash
for i in {1..126}
do
if [ $(($i%2)) -eq 0 ];
then
vzrestore /var/backup/dump/vzdump-openvz-100-2015_06_26-12_29_41.tar.lzo $(($i + 100)) -storage second
else
vzrestore /var/backup/dump/vzdump-openvz-100-2015_06_26-12_29_41.tar.lzo $(($i + 100))
fi
vzctl set $(($i + 100)) --hostname node$i.muzari.com
@Sekhmet
Sekhmet / spin.sh
Created June 27, 2015 10:06
Spin servers
#!/bin/bash
for i in {2..126}
do
while true
do
echo "Checking"
wget --spider -q "http://104.161.36.$(($i + 1)):7774" -T 1
@Sekhmet
Sekhmet / index.js
Created November 1, 2015 15:37
parser
var fs = require('fs');
var readline = require('readline');
var file = process.argv[2];
if(!file) {
console.log("Usage: \n\t node index.js file.txt");
process.exit(1);
}
<Button
android:textAllCaps="true"
style="@style/Widget.AppCompat.Button.Borderless"
android:text="LEARN MORE"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
Verifying that +smt is my blockchain ID. https://onename.com/smt