Skip to content

Instantly share code, notes, and snippets.

View yildirayunlu's full-sized avatar
🏠
Working from home

Yıldıray Ünlü yildirayunlu

🏠
Working from home
View GitHub Profile
@aliemir
aliemir / README.MD
Last active September 9, 2024 18:57
How to use `ionicons` in React + TypeScript project

How to use ionicons in React + TypeScript project

With this code snippet, you can use Ionicons in your React + TypeScript project with code completion and without any errors from React side.

  • Copy the content of the ion-icons.d.ts file.
  • Add scripts inside your <head> tags.
<head>
 
@bcinarli
bcinarli / colors.scss
Last active January 18, 2019 09:55
Import SCSS variable to JS/JSX
// Sometimes you want to share some variables between your SCSS and JS/JSX code
// To do this, you can levarage the :export command in SCSS.
$alertInfo: #b8d3e8;
$alertWarning: #fdf9c3;
$alertSuccess: #cfc;
$alertError: #e63f3f;
// this exports the variable to be available in JS
:export {
@jahe
jahe / enzyme-cheatsheet.js
Last active June 3, 2022 01:18
Enzyme Cheatsheet
// Show rendered HTML
const wrapper = shallow(<App />)
console.log(wrapper.debug())
// Disable lifecycle methods of react within tests
const wrapper = mount(<App />, { disableLifecycleMethods: true })
// Assert number of occurrences
expect(wrapper.find('p').length).toBe(1)
@engelju
engelju / elasticsearch-on-homestead.txt
Last active December 11, 2018 07:54 — forked from lukaswhite/elasticsearch-on-homestead.txt
Installing Elasticsearch on Laravel Homestead
# https://bosnadev.com/2014/09/12/install-elasticsearch-on-laravel-homestead/
# https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-repositories.html
# https://www.elastic.co/blog/elasticsearch-unplugged
# Install Java
sudo apt-get install openjdk-7-jre-headless -y
# Download & install the Public Signing Key
wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
@imkarthikk
imkarthikk / ElasticSearch.sh
Last active January 3, 2018 13:27 — forked from gourneau/ElasticSearch.sh
Shell Script to install Elastic Search on Ubuntu 14.04 Server
### Install Oracle Java 8, this means you agree to their binary license!!
cd ~
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections
sudo aptitude -y install oracle-java8-installer
### Download and Install ElasticSearch
@gourneau
gourneau / ElasticSearch.sh
Last active December 12, 2017 21:06
Elastic Search 1.4.2 with Oracle Java 8
### Install Oracle Java 8, this means you agree to their binary license!!
cd ~
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections
sudo aptitude -y install oracle-java8-installer
### Download and Install ElasticSearch
@Globegitter
Globegitter / es.sh
Last active November 18, 2020 12:52
Easy install for elasticsearch on Ubuntu 14.04
cd ~
##If you want to install OpenJDK
#sudo apt-get update
#sudo apt-get install openjdk-8-jre-headless -y
###Or if you want to install Oracle JDK, which seems to have slightly better performance
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
@Nilpo
Nilpo / gh_hook.php
Last active August 29, 2015 14:05 — forked from webjay/gh_hook.php
<?php
/**
* This file serves as a post receive hook for a GitHub repository. It should be placed in the root of the repository.
*
* To begin, you will need to store a secret key in an environmental variable on the server.
*
* export SECRET_TOKEN=your_token
*
*
@ricardo-rossi
ricardo-rossi / ElasticSearch.sh
Last active December 1, 2023 04:55
Installing ElasticSearch on Ubuntu 14.04
#!/bin/bash
### USAGE
###
### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7
### ./ElasticSearch.sh will fail because no version was specified (exit code 1)
###
### CLI options Contributed by @janpieper
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch
@lukaswhite
lukaswhite / elasticsearch-on-homestead.txt
Created August 3, 2014 08:58
Installing Elasticsearch on Laravel Homestead
# Install Java
sudo apt-get install openjdk-7-jre-headless -y
# Download & install the Public Signing Key
wget -qO - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | sudo apt-key add -
# Add the following to /etc/apt/sources.list
deb http://packages.elasticsearch.org/elasticsearch/1.3/debian stable main
# Update Aptitude