Skip to content

Instantly share code, notes, and snippets.

View adamdilek's full-sized avatar
🎯
focusing

Adam Dilek adamdilek

🎯
focusing
View GitHub Profile
@adamdilek
adamdilek / KebabChecker.php
Created October 13, 2011 13:39 — forked from lab2023/KebabChecker.php
KebabChecker
<?php
/**
* Created by JetBrains PhpStorm.
* User: Muhammet
* Date: 19.10.2011
* Time: 05:47
* To change this template use File | Settings | File Templates.
*/
// Version.php
@adamdilek
adamdilek / rails.org
Created May 14, 2012 15:39 — forked from map7/rails.org
Rails 3.1 autocomplete using coffee-script and jquery-ui
@adamdilek
adamdilek / binlistesi.sql
Created August 25, 2012 12:43
Türkiye BIN listesi
/*
Guncel BIN LISTESI
twitter : http://twitter.com/tserpico
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `binlist`
-- ----------------------------

Project Name

Requirements

Before generating your application, you will need:

# Use this setup block to configure all options available in SimpleForm.
# File Path: RAILS_ROOT/config/initializers/simple_form_bootstrap.rb
SimpleForm.setup do |config|
config.wrappers :bootstrap, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
b.use :html5
b.use :placeholder
b.use :label, class: 'control-label'
b.use :input
b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:
@adamdilek
adamdilek / 0_reuse_code.js
Last active August 29, 2015 14:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@adamdilek
adamdilek / README.md
Created April 1, 2016 17:29 — forked from fbaiodias/README.md
GraphQL circular dependencies

Circular dependencies on GraphQL schemas

Problem

Whenever I uncomment the lines on author.js I get the following error:

/Users/xicombd/Code/taskq/taskq-api/node_modules/graphql/jsutils/invariant.js:20
    throw new Error(message);
    ^
@adamdilek
adamdilek / ImageMagick-Amazon-Linux.md
Created April 12, 2016 06:48 — forked from ARolek/ImageMagick-Amazon-Linux.md
Install ImageMagick from source on Amazon Linux

I needed a newer version of ImageMagick than is available on the yum packages on Amazon Linux. I tried using the remi repo but it failed with dependency errors. Here is what I did to install ImageMagick with support for PNG, JPG, and TIFF.

download the most recent package

wget http://www.imagemagick.org/download/ImageMagick.tar.gz

uncomress the package

@adamdilek
adamdilek / script-score.sh
Created May 16, 2016 15:13 — forked from drewr/script-score.sh
Example of function_score using the script_score function. This achieves a result similar to creating a script field and then sorting descending by that dynamic value.
#!/bin/sh
curl -XDELETE localhost:9200/foo >/dev/null
curl -XPOST localhost:9200/foo/t -d'
{
"clicks": 10,
"impressions": 1000,
"when": "2013-10-01"
}