Skip to content

Instantly share code, notes, and snippets.

View morenoh149's full-sized avatar
💭
Working from 🛰

Harry Moreno morenoh149

💭
Working from 🛰
View GitHub Profile
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: foo
server: https://bar
name: baz
contexts:
- context:
cluster: baz
user: baz
@morenoh149
morenoh149 / 404.html
Created June 20, 2018 19:46
django admin unreachable
GET http://localhost:8000/admin
Page not found (404)
Request Method: GET
Request URL: http://localhost:8000/admin
Using the URLconf defined in mysite.urls, Django tried these URL patterns, in this order:
^ ^$ [name='index']
^admin/
^static\/(?P<path>.*)$
@morenoh149
morenoh149 / temp.sol
Created June 11, 2018 04:08
Compiled with `$ solcjs temp.sol {--abi,--bin}`
//Write your own contracts here. Currently compiles using solc v0.4.15+commit.bbb8e64f.
pragma solidity ^0.4.24;
contract SimpleStore {
function set(uint _value) public {
value = _value;
}
function get() public constant returns (uint) {
return value;
}
@morenoh149
morenoh149 / error.sh
Last active June 10, 2018 19:55
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
browser/foo.sol:10:9: TypeError: Type struct strings.slice memory is not implicitly convertible to expected type string storage pointer.
string storage s = "This-Is-A-Problem".toSlice();
^----------------------------------------------^
@morenoh149
morenoh149 / error.sh
Last active June 5, 2018 15:51
input dimension error with keras
ValueError: Error when checking input: expected dense_22_input to have 3 dimensions, but got array with shape (3, 592434)
$ node index.js
/Users/hmoreno/programming/s3test/node_modules/aws-sdk/lib/request.js:31
throw err;
^
Error: connect ETIMEDOUT 169.254.169.254:80
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1170:14)
var form = new FormData(document.getElementById('login-form'));
fetch("/login", {
method: "POST",
body: form
});
func (param i32 i32 i32) (result f32)
block f32
block
block
block
block
get_local 2
i32.const 0
i32.sub
br_table 0 1 2 3
@morenoh149
morenoh149 / Mount.js
Created March 26, 2018 21:59
react-transition-group HOC
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { CSSTransition } from 'react-transition-group';
/*
* Mount is a HOC that eases animating of components onto and off a screen
* designed for use with react-transition-group v2 (https://reactcommunity.org/react-transition-group/)
*/
class Mount extends Component {
constructor(props) {
# bash compatible version of https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/git/git.plugin.zsh
# Copied March 22nd 2018
# you can load these by adding `source git-aliases.sh` in your .bash_profile for example
: <<'END'
# Query/use custom command for `git`.
zstyle -s ":vcs_info:git:*:-all-" "command" _omz_git_git_cmd
: ${_omz_git_git_cmd:=git}