Skip to content

Instantly share code, notes, and snippets.

@maurelian
maurelian / console.sol
Last active February 25, 2022 18:44
A JS style console.log() function for solidity.
pragma solidity ^0.4.10;
// Update: Just use HardHat's: https://github.com/nomiclabs/hardhat/blob/master/packages/hardhat-core/console.sol
// Enables event logging of the format `console.log('descriptive string', variable)`,
// without having to worry about the variable type (as long as an event has been declared for that type in the
// Console contract.
contract Console {
event LogUint(string, uint);
@abeppu
abeppu / feelbetter.js
Last active February 6, 2021 19:06
Implementation of @FeelBetterBot
var Twit = require("twit");
var config = require('./oauthconfig');
console.log("config:");
console.log(config);
var T = new Twit({
consumer_key: config.consumer_key,
consumer_secret: config.consumer_secret,
access_token: config.access_token,
@zhuowei
zhuowei / glasslabs.md
Last active December 17, 2015 14:29
Glass Labs experiments: what they do

Glass Lab Experiments

Updated: July 2nd (XE7)

Ron Amadeo of Android Police did a review of these experiments: http://www.androidpolice.com/2013/05/24/google-glasss-hidden-labs-features-ok-glass-everywhere-web-browsing-video-stabilization-and-more-video/

Google Glass has a series of Labs experiments that can be enabled on engineering or userdebug builds. Using APKTool, I've removed that restriction and now they can be enabled with root access.

To start, for example, the SOUND_SEARCH lab, type in a root shell

@gabrielhpugliese
gabrielhpugliese / client.js
Created December 2, 2012 14:17
meteor login with facebook
/* Imagine you want to develop a facebook canvas app.
This snippet will do all the auth dance without requiring the user to click on login.
But if the user is not logged in facebook, it will ask for the user to login.
Tip: Open the browser console to see debug messages.
Followed instructions of Facebook: https://developers.facebook.com/docs/howtos/login/getting-started/
It's is possible to improve this code with more error handling.
*/
if (Meteor.is_client) {