Skip to content

Instantly share code, notes, and snippets.

Paruyr yogurt1

Block or report user

Report or block yogurt1

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View db_promise.js
function someHander(req, res, next) {
db.any('select * from users')
.then((data, cb) => {
let red = []
data.forEach(row => {
red[i] = row.username
})
res.json({
red
})
@yogurt1
yogurt1 / sort_ansi.c
Last active Sep 29, 2016
Sort from God, ANSI C version
View sort_ansi.c
#include <stdlib.h>
#include <stdio.h>
int main(void) {
int len;
scanf("%d", &len);
/* malloc array of ints */
int* arr = (int*)malloc(201 * sizeof(int));
for (int t, i = 0; i < len; i++) {
@yogurt1
yogurt1 / sort.cpp
Created Sep 29, 2016
Sort from god
View sort.cpp
#include <iostream>
#include <vector>
#include <algorithm>
#include <iterator>
int main(void) {
std::ios::sync_with_stdio(false);
int len;
std::cin >> len;
std::vector<int> vec(201);
@yogurt1
yogurt1 / body.pug
Last active Aug 11, 2016
Best template ever
View body.pug
body.hold-transition.skin-green.sidebar-mini
.wrapper
// Шапка
header.main-header
// Логотип
a.logo(href='#')
span.logo-mini
b Н
| К
span.logo-lg
View subclass.coffee
class Class
bar: -> console.log @a
class SubClass extends Class
inst = new SubClass
inst.a = 10
inst.bar() # => 10
@yogurt1
yogurt1 / pwgen.sh
Last active May 14, 2018
pwgen bash edition
View pwgen.sh
# How to use: sh pwgen.sh <password length, default 9>
_LENGTH=9
if test x"$@" != x
then _LENGTH="$@"
fi
cat /dev/urandom |\
tr -dc 'A-Za-z0-9' |\
fold -w $_LENGTH |\
#-w 20 |\
You can’t perform that action at this time.