Skip to content

Instantly share code, notes, and snippets.

View voratham's full-sized avatar
🤔
finding learning new thing ?

Voratham.Siri voratham

🤔
finding learning new thing ?
View GitHub Profile
@hkxicor
hkxicor / server.js
Created May 18, 2018 07:40
smart contract interaction
#!/usr/bin/env node
const Web3 = require('web3');
const solc = require('solc');
const fs = require('fs');
const http = require('http');
if (typeof web3 !== 'undefined') {
web3 = new Web3(web3.currentProvider);
} else {
@jdkanani
jdkanani / walletconnect-provider.js
Created April 25, 2018 17:37
Walletconnect providers
import Web3 from 'web3'
function getCallback(payload, cb) {
return function(err, result) {
const obj = {}
const keys = ['id', 'jsonrpc']
keys.forEach(key => {
obj[key] = payload[key]
})
obj.result = result
@iest
iest / readme.md
Last active December 4, 2024 05:24
Moving from lodash/fp to ramda

Moving from lodash/fp to ramda

How

Good news is we're only using lodash/fp, which makes it easier to match function signatures.

  1. Find most-used lodash methods, we'll convert these first maybe?
  2. Go through each lodash method, find the ramda equivalent where possible
  3. Write a codemod to rewrite those usages
  4. Who the fuck thought function aliases were a good idea
@NSLog0
NSLog0 / commend_helper_vim.js
Last active May 16, 2018 15:47
Vim tutorials
var commend_helper = {
':w': 'บันทึกไฟล์',
':wq': 'บันทึกและออก',
':q': 'ออกแบบปกติ',
':q!': 'ออกแบบไม่บันทึก',
Esc: 'ออกจากโหมด insert, virtual, normal',
':': 'เรียกใช้คำสั่ง Plugin หรือคำสั่ง Buildin'
};
@acoshift
acoshift / .gitconfig
Last active March 14, 2020 23:40
.gitconfig [alias]
[alias]
cm = commit
co = checkout
p = push
pp = pull
tags = tag -l
b = branch
bb = branch -a
bd = branch -D
pod = push origin --delete
@greatghoul
greatghoul / content1.js
Last active May 6, 2023 00:32
chrome extension message passing example
chrome.runtime.onMessage.addListener(
function(message, sender, sendResponse) {
console.log(`${message} in content1`)
sendResponse(`${message} from content1`)
// setTimeout(() => {
// sendResponse(`${message} from content1`)
// }, 2000)
//
// return true
}
@lavaldi
lavaldi / tweaks-sublime-italic-operator-mono.md
Created March 16, 2017 02:02
Operator Mono & Sublime Text 3 themes
  1. Install Package Resource Viewer.
  2. In package control window select ‘Package Resource Viewer: Open Resource’.
  3. Scroll down until you find the option: ‘Color Scheme — Default’ (or your theme with color scheme .tmTheme) and select it.
  4. Add the following
<!-- Operator Tweaks -->
  <dict>
    <key>name</key>
 Italic HTML attribute names
@gemmadlou
gemmadlou / 001-ddd.md
Last active August 9, 2018 07:52
DDD
@shashankmehta
shashankmehta / setup.md
Last active May 1, 2026 14:25
Setup PHP and Composer on OSX via Brew

First install Brew on your MAC

  • Setup Brew: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • brew update
  • brew tap homebrew/dupes
  • brew tap homebrew/php
  • Install PHP 7.0.+ brew install php70
  • Install mcrypt: brew install mcrypt php70-mcrypt
  • Finally, install composer: brew install composer