Skip to content

Instantly share code, notes, and snippets.

View reactcoder-it's full-sized avatar
🌴
On vacation

Vadim Pashaev reactcoder-it

🌴
On vacation
View GitHub Profile
@reactcoder-it
reactcoder-it / template.cs
Created October 24, 2012 19:36
Template for c# file
using System;
namespace NewApp
{
public class Program
{
static void Main()
{
}
}
######################################################################################
# GNU GCC ARM Embeded Toolchain base directories and binaries
######################################################################################
GCC_BASE = E:/Toolchains/GNU_GCC_ARM/4.7/
GCC_BIN = $(GCC_BASE)bin/
GCC_LIB = $(GCC_BASE)arm-none-eabi/lib/
GCC_INC = $(GCC_BASE)arm-none-eabi/include/
AS = $(GCC_BIN)arm-none-eabi-as
CC = $(GCC_BIN)arm-none-eabi-gcc
CPP = $(GCC_BIN)arm-none-eabi-g++
@reactcoder-it
reactcoder-it / nginx_nodejs.md
Created September 11, 2018 11:10 — forked from tomasevich/nginx_nodejs.md
Сервер в связке Nginx + NodeJs

Сервер в связке Nginx + NodeJs

Данная пошаговая инструкция поможет освоить основы на простом примере

Для справки

Сервер поднимался на Debian 8 c характеристиками:

CPU - 1 ядро x 500 МГц

@reactcoder-it
reactcoder-it / remove-from-git-index
Created September 12, 2018 01:05 — forked from cheshirrrcat/remove-from-git-index
Удалить файл из индекса git-репозитория без его физического удаления
Для удаления файла из git-репозитория без его физического удаления:
git rm --cached mylogfile.log
Для удаления папки (рекурсивно) можно сделать так:
git rm -r --cached folderName
А для того, чтобы ситуация не повторялась, лучше добавьте файл или папку в .gitignore.
@reactcoder-it
reactcoder-it / App.js
Created October 17, 2018 21:25 — forked from koistya/App.js
How to add `onscroll` event in ReactJS component
import React from 'react';
let lastScrollY = 0;
let ticking = false;
class App extends React.Component {
componentDidMount() {
window.addEventListener('scroll', this.handleScroll);
}
export default () => (
<div>
Hello world
<p>scoped!</p>
<style jsx>{`
p {
color: blue;
}
div {
background: red;
import { ApolloServer } from "apollo-server-micro"
import { schema } from "../../apollo/schema"
const apolloServer = new ApolloServer({
schema,
context: async (ctx) => {
return ctx
},
})
// Problem link: https://leetcode.com/problems/valid-parentheses/
const isValid = (string) => {
// create a hashMap to store the valid match
const bracketsMap = {
'(': ')',
'{': '}',
'[': ']'
}
// create a stack data structure with array
const mysql = require("mysql")
const fs = require("fs")
const json2csv = require("json2csv").Parser
const connection = mysql.createConnection({
host: "localhost",
user: "",
password: "",
database: "",
})