Skip to content

Instantly share code, notes, and snippets.

View Necmttn's full-sized avatar
🖖
Maker

Neco Necmttn

🖖
Maker
View GitHub Profile
const JobFeed = () => (
<Query query={GET_JOB}>
{
({ loading, error, data }) => {
if (error) return <Error />
if (loading || !data) return <Fetching />;
return <JobList dogs={data.jobs} />
}
}
</Query>
@Necmttn
Necmttn / redux.js
Created November 28, 2018 10:37
Redux example Ajax
export const FETCH_JOB = "FETCH_JOB";
export function fetchJob(job_name) {
 return function (dispatch) {
 dispatch(fetchingJob(job_name));
 return axios.get(searchApi(`/jobs/${job_name}`)).then(function (response) {
 return dispatch(jobFetched(response.data));
 }).catch(function (error) {
 console.error(error);
 return dispatch(jobFetchFailed(error));
 });
" This is added by the install script.
set runtimepath+=~/.dotfiles/vim
"""""""""""""""""""""""""""""""""""""""""""""
" GENERAL
"""""""""""""""""""""""""""""""""""""""""""""
" Language
set encoding=utf8
#!/bin/bash
#example ./slack_hook.sh <process> <logfile_path> <slack_webhook_url> <name_of_the_project>
#
PROCESS=$1
LOGFILE=$2
SLACK_HOOK=$3
NAME_OF_THE_PROJECT=$4

Weblate translation source repo

Q & A for how to use Weblate.

Q: I have created translator account but it's doesn't see the projects i want ?

A: Weblate users can able to see the projects in their dashboard if they set from their profile as they can speak that language.

language settings

@Necmttn
Necmttn / main.go
Created January 12, 2018 15:55
main.go
package main
import (
// "encoding/xml"
"encoding/xml"
"fmt"
"golang.org/x/net/html"
"log"
"net/http"
"net/url"
@Necmttn
Necmttn / TextBody.js
Created November 7, 2017 15:52
Hover State handling example in React component.
class TextBody extends React.Component {
constructor(props){
super(props)
this.state = {
code: false
}
}
mouseEnter(name) {
this.setState({
import React from 'react'
import PropTypes from 'prop-types'
import Link from 'gatsby-link'
import Helmet from 'react-helmet'
import './index.css'
const Header = () => (
<div
style={{
import React from 'react'
import Link from 'gatsby-link'
import styled from "styled-components"
const IndexPage = () => (
<div>
<h1>Hello</h1>
<p>I am Necmettin Karakaya, </p>
<p>self-tought software developer</p>
@Necmttn
Necmttn / async-Map-function.js
Last active October 23, 2017 08:05
example for how to handle async map function and get results.
function asyncFunctino(name, wait) {
return new Promise((resolve, reject) => {
setTimeout(() => {
console.log(`${name} done ${+new Date}`)
resolve(`neco vs ${name} waited ${wait}`)
}, wait) //resolves after 5 second.
})
}
const nameArray = [