Skip to content

Instantly share code, notes, and snippets.

View fedir's full-sized avatar
🌤️
The sun is behind every cloud

Fedir RYKHTIK fedir

🌤️
The sun is behind every cloud
View GitHub Profile
@fedir
fedir / cors-nginx.conf
Created June 13, 2016 17:30 — forked from michiel/cors-nginx.conf
Wide-open CORS config for nginx
#
# Wide-open CORS config for nginx
#
location / {
if ($request_method = 'OPTIONS') {
add_header "Access-Control-Allow-Origin" $http_origin;
#
cd ~
# Install dependencies
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
# Install ElasticSearch from the official repository
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.7.0.deb
sudo dpkg -i elasticsearch-1.7.0.deb
nmap --script ssl-enum-ciphers -p 443 twitter.com | grep "SSLv3: No supported" || echo "Site vulnerable to poodle"
<?xml version="1.0" encoding="UTF-8"?>
<code_scheme name="TYPO3_jr">
<option name="OTHER_INDENT_OPTIONS">
<value>
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
<option name="TAB_SIZE" value="4" />
<option name="USE_TAB_CHARACTER" value="true" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
server {
listen 80;
server_name localhost;
root /var/www;
client_max_body_size 32M;
location = /clear.gif {
empty_gif;
expires max;
@fedir
fedir / fr.sh
Created February 11, 2014 15:23 — forked from dadoonet/fr.sh
#!/bin/bash
ES='http://localhost:9200'
ESIDX='test3'
ESTYPE='test'
curl -XDELETE $ES/$ESIDX
curl -XPUT $ES/$ESIDX/ -d '{
"settings" : {
/*
* Takes provided URL passed as argument and make screenshots of this page with several viewport sizes.
* These viewport sizes are arbitrary, taken from iPhone & iPad specs, modify the array as needed
*
* Usage:
* $ casperjs screenshots.js http://example.com
*/
var casper = require("casper").create();
body {
color: #444;
font-family: Helvetica, Arial, sans-serif;
font-size: 14px;
padding: 30px;
margin: 0px;
}
h1 {
font-size: 24px;