This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Create config | |
CREATE TEXT SEARCH CONFIGURATION public.my_config ( COPY = pg_catalog.spanish ); | |
# 2. Create dictionary | |
CREATE TEXT SEARCH DICTIONARY public.my_dict ( TEMPLATE = pg_catalog.simple, STOPWORDS = russian); | |
# 3. Alter config | |
ALTER TEXT SEARCH CONFIGURATION public.my_config ALTER MAPPING FOR asciiword, asciihword, hword_asciipart, hword, hword_part, word WITH my_dict; | |
# 4. ???? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "cus_HgmX89nEIYSwXA", | |
"object": "customer", | |
"address": null, | |
"balance": 0, | |
"created": 1595351372, | |
"currency": "hnl", | |
"default_source": "card_1H7Oy7Cg28Y4yaQ4apG3yFRY", | |
"delinquent": false, | |
"description": null, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /etc/postgresql/11/main | |
nano pg_hba.conf | |
service postgresql restart | |
pg_dump -U postgres -W -F t TodoLegalDB_Production --verbose > /root/dump.tar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Itch.io release | |
on: | |
release: | |
types: [published] | |
jobs: | |
upload: | |
runs-on: ubuntu-latest | |
steps: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
turupawn@userr:~/Projects/ShyPanda$ npm install | |
> [email protected] preinstall /home/turupawn/Projects/ShyPanda/node_modules/scrypt | |
> node node-scrypt-preinstall.js | |
> [email protected] install /home/turupawn/Projects/ShyPanda/node_modules/scrypt | |
> node-gyp rebuild | |
make: Entering directory '/home/turupawn/Projects/ShyPanda/node_modules/scrypt/build' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Gemfile | |
``` | |
gem 'devise' | |
gem 'simple_token_authentication' | |
``` | |
``` | |
bundle install | |
rails generate devise:install | |
rails generate devise User |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.8.0; | |
contract HackathonMunon | |
{ | |
function add(uint256 a, uint256 b) internal pure returns (uint256) { | |
return a + b; | |
} | |
function add8(uint32 a, uint32 b) internal pure returns (uint32) { | |
return a + b; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity 0.7.4; | |
contract YourContract { | |
enum Choice { Rock, Paper, Scissors } | |
uint256 public challenge_count = 0; | |
mapping(uint256 => address payable) public challenger_addresses; | |
mapping(uint256 => address payable) public challenged_addresses; | |
mapping(uint256 => uint256) public bets; | |
mapping(uint256 => Choice) private challenger_choices; | |
mapping(uint256 => Choice) private challenged_choices; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function getRevertReason(txHash){ | |
const tx = await web3.eth.getTransaction(txHash) | |
var result = await web3.eth.call(tx, tx.blockNumber) | |
result = result.startsWith('0x') ? result : `0x${result}` | |
if (result && result.substr(138)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.4; | |
contract MyContract { | |
string public hello; | |
constructor() | |
{ | |
hello = "Hola mundo!"; |