Skip to content

Instantly share code, notes, and snippets.

View buddies2705's full-sized avatar
🏠
Working from home

Gaurav buddies2705

🏠
Working from home
  • Bangalore
View GitHub Profile
@buddies2705
buddies2705 / radio.html
Created December 30, 2018 16:23
Radio app
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="user-scalable=no">
<title>Howler.js Radio</title>
<link rel="stylesheet" href="../css/howler.css">
</head>
<body>
<div class="title" style="text-align: center;color: aquamarine;"> Gaurav.fm </div>
@buddies2705
buddies2705 / CrudApp.sol
Created January 8, 2019 20:22
Upgradable Crud using zeppelin OS
pragma solidity ^0.4.24;
import "zos-lib/contracts/Initializable.sol";
contract CrudApp is Initializable {
struct country{
string name;
string leader;
uint256 population;
@buddies2705
buddies2705 / single-page-app.js
Last active January 25, 2019 10:31
MithrilJs tutorial
<!DOCTYPE html >
<html>
<body>
<script src = "https://unpkg.com/mithril/mithril.js" > < /script>
<script >
var root = document.body
var count = 0
var increment = function() {
m.request({
<!DOCTYPE html>
<html>
<body>
<script src="https://unpkg.com/mithril/mithril.js"></script>
<script>
var root = document.body
var count = 0
var increment = function() {
m.request({
@buddies2705
buddies2705 / ListTableViewController.swift
Created January 28, 2019 07:05
ListTableViewController
class ListTableViewController: UITableViewController {
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if let cell = tableView.dequeueReusableCell(withIdentifier: "DataTableViewCell", for: indexPath) as? DataTableViewCell {
var koinObject : KoinModel?
if(self.currentIndex == 0){
koinObject = appDelegateObj().finalModelObject?.inrList[indexPath.row]
cell.iconImageView.image = UIImage(named: "rupees")
}
else if(self.currentIndex == 1){
koinObject = appDelegateObj().finalModelObject?.bitcoinList[indexPath.row]
@buddies2705
buddies2705 / ViewController.swift
Created January 28, 2019 07:09
ViewController
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.getKoinData()
}
func getKoinData(){
ServiceManager.getRequestWithFullUrl("BASE_URL", success: {
(responseObject) in
print(responseObject)
@buddies2705
buddies2705 / ProfileViewController.swift
Created January 28, 2019 07:11
ProfileViewController
class ProfileViewController: UIViewController,PageContainerCustomDelegates {
var currentIndexValue : Int = 0
var onBoardPageViewController: ContainerViewController? {
didSet {
}
}
override func viewDidLoad() {
super.viewDidLoad()
ServiceManager.getRequestWithFullUrl("https://koinex.in/api/ticker", success: {
const Web3 = require('web3')
const rpcURL = "Your_node_url"
var web3 = new Web3(new Web3.providers.HttpProvider(rpcURL));
var nodemailer = require('nodemailer');
var count = 0
var isMailSend = false;
var numberOfRetries = 3;
var cron = require('node-cron');
@buddies2705
buddies2705 / subgraph.yaml
Created February 28, 2019 12:44
Gravatar for Ethereum
specVersion: 0.0.1
description: Gravatar for Ethereum
repository: https://github.com/rodventures/gravity-subgraph
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum/contract
name: Gravity
network: mainnet
source:
@buddies2705
buddies2705 / mapping.ts
Created February 28, 2019 13:27
Gravatar Mapping
import { NewGravatar, UpdatedGravatar } from './types/Gravity/Gravity'
import { Gravatar } from './types/schema'
export function handleNewGravatar(event: NewGravatar): void {
let gravatar = new Gravatar(event.params.id.toHex())
gravatar.owner = event.params.owner
gravatar.displayName = event.params.displayName
gravatar.imageUrl = event.params.imageUrl
gravatar.save()
}