Skip to content

Instantly share code, notes, and snippets.

View korrio's full-sized avatar
👽

kOrriO korrio

👽
  • Hal Finney Co.,Ltd.
  • mempool
  • X @korrio
View GitHub Profile
@korrio
korrio / eloquent.md
Last active August 29, 2015 14:22 — forked from msurguy/eloquent.md

Conventions:

Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):

class Shop extends Eloquent {}

Using custom table name

protected $table = 'my_shops';

@korrio
korrio / active.md
Created August 3, 2016 14:47 — forked from statguy/active.md

Most active GitHub users in Thailand

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 29 Jul 2015 01:52:41 GMT till Fri, 29 Jul 2016 01:52:41 GMT.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user => user.followers > 6)
@korrio
korrio / demo.java
Last active November 12, 2017 15:49 — forked from anonymous/demo.java
fork
package com.locationupdates.event;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.widget.Button;
@korrio
korrio / media-query.css
Created December 14, 2017 05:43 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@korrio
korrio / java Bank Account Management Project.
Last active February 4, 2018 07:54 — forked from shohan4556/java Bank Account Management Project.
java Bank Account Management Project.
import java.util.*;
/**
*
* @author Shohan
* Bank Account Class
* // Main ClassName -- "Main"
* // Add interest feature by @korrio
*/
class Account{
Solidity lets you program on Ethereum, a blockchain-based virtual machine that allows the creation and execution of smart contracts, without needing centralized or trusted parties.
Solidity is a statically typed, contract programming language that has similarities to Javascript and C. Like objects in OOP, each contract contains state variables, functions, and common data types. Contract-specific features include modifier (guard) clauses, event notifiers for listeners, and custom global variables.
Some Ethereum contract examples include crowdfunding, voting, and blind auctions.
As Solidity and Ethereum are under active development, experimental or beta features are explicitly marked, and subject to change. Pull requests welcome.
// First, a simple Bank contract
// Allows deposits, withdrawals, and balance checks
// simple_bank.sol (note .sol extension)
/* **** START EXAMPLE **** */
@korrio
korrio / README.md
Created November 6, 2018 09:20 — forked from clhenrick/README.md
PostgreSQL & PostGIS cheatsheet (a work in progress)
const express = require('express');
const server = express();
const request = require('request');
const proxy = require('http-proxy-middleware');
server.set('view engine', 'ejs');
const createProxy = (path, target) =>
server.use(path, proxy({ target, changeOrigin: true, pathRewrite: {[`^${path}`]: ''} }));
// Copy paste this script on your console
var disabled = false;
var r = confirm('Start the Autolike on this page?');
var min_time_to_decide = 300;
var max_additional_time_to_decide = 1000;
var time_to_decide = function() {
additional_time_to_decide = Math.floor(Math.random() * max_additional_time_to_decide);
return min_time_to_decide + additional_time_to_decide;
@korrio
korrio / FoodToken.sol
Last active February 5, 2021 14:42 — forked from MicahZoltu/FoodToken.sol
Testnet Tokens
pragma solidity >= 0.7.0;
contract FoodToken {
uint256 constant public totalSupply = 10_000_000 * 10**18;
mapping (address => uint256) public balanceOf;
mapping (address => mapping (address => uint256)) public allowance;
string constant public symbol = "FOOD";
uint8 constant public decimals = 18;
string constant public name = "Food Token";