Skip to content

Instantly share code, notes, and snippets.

View jedsada-gh's full-sized avatar
😄
undefined

Jedsada Tiwongvorakul jedsada-gh

😄
undefined
View GitHub Profile
cd /Library/Preferences
sudo rm com.sophos.sav.plist

cd /Library/Application\ Support/Sophos/cloud/Installer.app/Contents/MacOS/tools/
sudo ./InstallationDeployer —force_remove
@jedsada-gh
jedsada-gh / ModSalary.sol
Created April 13, 2021 11:02 — forked from korrio/ModSalary.sol
ModSalary.sol
// File: @openzeppelin/contracts/math/SafeMath.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
/******************************\
!!! คำเตือน โปรดระวัง !!!
การใช้บอท มีความเสี่ยงที่จะถูกแบนได้
แนะนำให้สร้างบัญชีใหม่มาบอทโดยเฉพาะ
\******************************/
class TLMBot {
constructor(minWaitTime = 5000, maxWaitTime = 15000) {
this.minWaitTime = minWaitTime;
this.maxWaitTime = maxWaitTime;
@jedsada-gh
jedsada-gh / http-benchmark.md
Created November 1, 2019 08:08 — forked from denji/http-benchmark.md
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)
@jedsada-gh
jedsada-gh / backup-github.sh
Last active October 5, 2019 07:09 — forked from darktim/backup-github.sh
If you have more than 30 Repositories, the original script will not download all. The github api limits the entries to 30 per page but you can raise that up to 100. I have added a small loop which sets the limit to 90 and cycles through all pages until the listing on a page is empty...
#!/bin/bash
# A simple script to backup an organization's GitHub repositories.
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files
GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up
GHBU_UNAME=${GHBU_UNAME-"<CHANGE-ME>"} # the username of a GitHub account (to use with the GitHub API)
GHBU_PASSWD=${GHBU_PASSWD-"<CHANGE-ME>"} # the password for that account
GHBU_GITHOST=${GHBU_GITHOST-"<CHANGE-ME>.github.com"} # the GitHub hostname (see notes)
GHBU_PRUNE_OLD=${GHBU_PRUNE_OLD-true} # when `true`, old backups will be deleted
GHBU_PRUNE_AFTER_N_DAYS=${GHBU_PRUNE_AFTER_N_DAYS-3} # the min age (in days) of backup files to delete
pragma solidity ^0.4.15;
contract StringsAndBytes {
/* --- public variables for storing tests results */
string public lastTestStringResult; //
bytes32 public lastTestBytes32Result; //
bytes public lastTestBytesResult; // bytes: dynamically-sized byte array
bool public lastTestBoolResult; //
@jedsada-gh
jedsada-gh / GitCommitEmoji.md
Created April 1, 2019 03:01 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@jedsada-gh
jedsada-gh / README-Template.md
Created March 2, 2019 07:42 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@jedsada-gh
jedsada-gh / Solidity050Changes.sol
Created February 14, 2019 14:34 — forked from tomw1808/Solidity050Changes.sol
Breaking Changes From Solidity 0.5.0
pragma solidity 0.5.0;
contract SolidityChanges {
/**
* https://solidity.readthedocs.io/en/v0.5.0/050-breaking-changes.html#semantic-and-syntactic-changes
*
* The functions .call(), .delegatecall(), staticcall(),
* keccak256(), sha256() and ripemd160() now accept only
* a single bytes argument. Moreover, the argument is
* not padded. This was changed to make more explicit
@jedsada-gh
jedsada-gh / transaction.js
Created February 4, 2019 08:56 — forked from WietseWind/transaction.js
Send XRP transaction to Ripple XRP Ledger
/**
* Use: node transaction.js AMOUNT:FROMADDR:TOADDR:TOTAG
* eg: node transaction.js 10:rXXXXXXX:rXXXXXX:1337
* To be able to sign the transaction, the object 'wallets'
* below should contain the secret key for the used from-wallet.
*/
const RippleAPI = require('ripple-lib').RippleAPI
const api = new RippleAPI({ server: 'wss://s1.ripple.com' }) // Public rippled server
const fetch = require('node-fetch')