Skip to content

Instantly share code, notes, and snippets.

Avatar

Roman Storm rstormsf

View GitHub Profile
View vesting.sol
pragma solidity 0.4.24;
import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol";
import "openzeppelin-solidity/contracts/math/SafeMath.sol";
contract VestingVault12 {
using SafeMath for uint256;
using SafeMath for uint16;
@rstormsf
rstormsf / infura-events.json
Created May 13, 2020
Infura broken events.
View infura-events.json
This file has been truncated, but you can view the full file.
[
{
"address": "0x910Cbd523D972eb0a6f4cAe4618aD62622b39DbF",
"blockHash": "0x5b560758531c59bc703b9dc7bf8b74769e3a55229d1fd53022263a403dcb5042",
"blockNumber": 9118009,
"event": "Deposit",
"id": "log_b7b99605",
"logIndex": 80,
"raw": {
View infura-broken-events.json
This file has been truncated, but you can view the full file.
[
{
"address": "0x910Cbd523D972eb0a6f4cAe4618aD62622b39DbF",
"blockHash": "0x5b560758531c59bc703b9dc7bf8b74769e3a55229d1fd53022263a403dcb5042",
"blockNumber": 9118009,
"logIndex": 80,
"removed": false,
"transactionHash": "0xbe366e70f6d2886cd29f260bc2cfff26f86158f81577f448af456ddba64b7a59",
"transactionIndex": 107,
View some.html.slim
- flash.each do |key, value|
javascript:
console.log("#{key}");
toastr.options = {
closeButton: true,
progressBar: true,
timeOut: 9000
};
var flash = {};
flash.message = "#{value}";
@rstormsf
rstormsf / gitpull.rb
Created Sep 28, 2015
git pull all directories
View gitpull.rb
#!/bin/ruby
Dir.chdir(Dir.home + '/repos/all')
dirs = Dir.entries('.').select {|entry| File.directory? File.join('.', entry) and !(entry =='.' || entry == '..') }
dirs.each do |d|
Dir.chdir("#{Dir.pwd + '/' + d}")
puts Dir.pwd
system "git pull"
Dir.chdir(Dir.pwd + "/../")
end
View index.html
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<link rel="stylesheet" type="text/css" href="../dist/fortitude.css">
<link rel="stylesheet" type="text/css" href="../dist/fortitude-theme.css">
<script src="../dist/fortitude.js"></script>
@rstormsf
rstormsf / todolist.js.jsx
Created Aug 7, 2015
RailsConf 2015 - React.js on Rails - fix on getInitialState when using ES6 classes.
View todolist.js.jsx
class TodoList extends React.Component {
constructor(props) {
super(props);
this.state = {name: "nope"};
}
render() {
return (
<ul>
<li>Updated</li>
View index.rb
mobile_emulation = { "deviceName" => "Google Nexus 5" }
caps = Selenium::WebDriver::Remote::Capabilities.chrome(
"chromeOptions" => { "mobileEmulation" => mobile_emulation })
@driver = Selenium::WebDriver.for :remote, url: 'http://localhost:4444/wd/hub', desired_capabilities: caps
@driver.navigate.to "https://www.gmail.com/"
View build.prop
# begin build properties
# autogenerated by buildinfo.sh
ro.build.id=JZO54K
ro.build.display.id=JZO54K.N8010XXUCMK2
ro.build.version.incremental=N8010XXUCMK2
ro.build.version.sdk=16
ro.build.version.codename=REL
ro.build.version.release=4.1.2
ro.build.date=Wed Nov 20 16:29:39 KST 2013
ro.build.date.utc=1384932579