Skip to content

Instantly share code, notes, and snippets.

Damir Fakhrutdinov ramainen

  • Russia
Block or report user

Report or block ramainen

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
ramainen / App.js
Last active May 17, 2018
Примеры интеракций
View App.js
import React, { Component } from 'react';
import './App.css';
import Titler from './Titler'
import {observer, inject} from 'mobx-react';
View vibrate.js
View projecter.go
package main
import (
View pages.sql
CREATE TABLE `pages` (
`url` text,
`text` text,
`title` text,
`page_id` int(11) DEFAULT NULL,
`template` varchar(255) DEFAULT NULL,
`type` varchar(255) DEFAULT NULL,
`multi_domain` varchar(255) DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
  1. Жарим мясо на сковороде.
  2. Подкидываем в мясо лук и морковь, обжариваем.
  3. Подкидываем пару столовых ложек муки
  4. Сразу подкидываем пару столовых ложек майонеза и столько же кетчупа
  5. Чайная ложка сахара, соль по вкусу
  6. Заливаем водой, мешаем, чтобы не было комков, тушим. (если мясо готово при обжарке, достаточно дать закипеть)


View designer.html
<link rel="import" href="../topeka-elements/avatars.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-pages/core-pages.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../paper-checkbox/paper-checkbox.html">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
//Sample I use
socket.on('disconnect', function() {
	if(typeof(socket._room) != 'undefined'){
		for(key in socket._room){
			if(Object.keys(io.sockets.adapter.rooms[socket._room[key]]).length == 0){
				delete io.sockets.adapter.rooms[socket._room[key]];
	delete io.sockets.adapter.rooms[];


var table_id = 1; // example, python will give this value

var socket = io('http://localhost:3000/table'+table_id');
socket.on('connect', function() {
	socket.emit('join', "table_"+table_id);
View sample.html
<script src="/cms/external/"></script>
<script>var socket = io("");socket.emit("register", { userid: "75b0390c23ecef9109e66d0b352a1a66" });</script>
//бизнес логика
View gist:514a76743bedbbc7bbf3
function download_file($adress){
$adress = str_replace('+',' ',$adress);
$file = d()->File->where('title = ?',$adress);
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header("Content-Disposition: attachment; filename*=UTF-8''".rawurlencode( $file->title).'.'.$file->ext."");
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
You can’t perform that action at this time.