Skip to content

Instantly share code, notes, and snippets.

View 6pm's full-sized avatar
💭
I may be slow to respond.

Slava 6pm

💭
I may be slow to respond.
View GitHub Profile
@6pm
6pm / iterateGenerator.js
Last active August 13, 2017 08:21
iterate urls with fetch and generators
function executeGenerator(generator, yieldValue) {
let next = generator.next(yieldValue);
if (!next.done) {
next.value.then(
result => executeGenerator(generator, result),
err => generator.throw(err)
);
} else {
// catch return of generator
@6pm
6pm / Instructions.md
Created December 4, 2017 12:06 — forked from pgilad/Instructions.md
Git commit-msg hook to validate for jira issue or the word merge

Instructions

  • copy the file commit-msg to .git/hooks/commit-msg
  • make sure your delete the sample file .git/hooks/commit-msg.sample
  • Make commit msg executable. chmod +x .git/hooks/commit-msg
  • Edit commit-msg to better fit your development branch, commit regex and error message
  • Profit $$

Shell example

pragma solidity ^0.4.0;
contract Ownable {
address owner;
function Ownable() public {
owner = msg.sender;
}
@6pm
6pm / metro.config.js
Last active June 10, 2020 08:50
metro.config.js
const path = require('path');
// react-native >= 0.57
const extraNodeModules = {
'qb-core': path.resolve(__dirname + '/../qb-core/'),
};
const watchFolders = [
path.resolve(__dirname + '/../qb-core/')
];
@6pm
6pm / stratos.sh
Created February 5, 2022 16:35
install stratos node. Updated nodes.guru script
#!/bin/bash
# wget -q -O stratos.sh https://api.nodes.guru/stratos.sh && chmod +x stratos.sh && sudo /bin/bash stratos.sh
exists()
{
command -v "$1" >/dev/null 2>&1
}
if exists curl; then
echo ''