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 / 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 ''
@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/')
];
pragma solidity ^0.4.0;
contract Ownable {
address owner;
function Ownable() public {
owner = msg.sender;
}
@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

@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 / random.js
Created August 6, 2017 11:49 — forked from kerimdzhanov/random.js
Javascript get random number in a specific range
/**
* Get a random floating point number between `min` and `max`.
*
* @param {number} min - min number
* @param {number} max - max number
* @return {float} a random floating point number
*/
function getRandom(min=0, max=10) {
return Math.random() * (max - min) + min;
}
@6pm
6pm / README.md
Created March 12, 2017 20:35 — forked from Dr-Nikson/README.md
Auth example (react + redux + react-router)
@6pm
6pm / сортувати за 2 полями в обєкті. Count буде пріоритетнішшим
Created December 5, 2016 12:36
javascript sort - сортувати за 2 полями в обєкті. Count буде пріоритетнішшим
var data = [
{ count: 'phone', year: '1956' },
{ count: 'phone', year: '1971' },
{ count: 'text', year: '1989' },
{ count: '33', year: '1932' },
{ count: '33', year: '1912' },
{ count: 'text', year: '1954' },
{ count: 'phone', year: '1920' },
{ count: '33', year: '3444' }
];
@6pm
6pm / gist:2b028b4d456b798bf2b5
Created September 27, 2015 12:25
установити node js на убунту останньої версії
Install curl
sudo apt-get install curl
Install NodeJS :
curl -sL https://deb.nodesource.com/setup_4.x | sudo bash -
sudo apt-get install -y nodejs
@6pm
6pm / gist:bbd803e8678be76e24f2
Created August 21, 2015 13:22
portfolio carousel
.portfolio__carousel__wrap
.portfolio__carousel.owl-carousel
// one item
figure.portfolio__carousel__item.item.animated.fadeOut
img(src='img/portfolio/1.jpg' alt='portfolio')
figcaption
h4 Coffee shop
p Design and branding. She brings an eternal summer along.
i.ion-ios-world-outline