Skip to content

Instantly share code, notes, and snippets.

View amal's full-sized avatar
👨‍💻

Art Shendrik amal

👨‍💻
View GitHub Profile
@amal
amal / CATCH_Keras_RL.md
Created July 8, 2016 14:30 — forked from EderSantana/CATCH_Keras_RL.md
Keras plays catch - a single file Reinforcement Learning example
@amal
amal / gist:d708b1f0f225174205f0
Created October 18, 2014 16:27
Example of DSL for JSON in Kotlin
json {
"name" - "Rob Ashton"
"age" - 5
"address" - {
"number" - 444
"line one" - "never you mind"
}
"family".array(
{
"name" - "Gareth Ashton"
@amal
amal / html.part.html
Created November 28, 2012 19:41 — forked from bladeofsteel/html.part.html
Элементарные социальные share-кнопки. (jQuery version) see http://habrahabr.ru/post/156185/
// Пример кнопок с минимальной настройкой
<p>Поделиться:
<button class="social_share" data-type="vk">ВКонтакте</button>
<button class="social_share" data-type="fb">Facebook</button>
<button class="social_share" data-type="tw">Twitter</button>
<button class="social_share" data-type="lj">LiveJournal</button>
<button class="social_share" data-type="ok">Одноклассники</button>
<button class="social_share" data-type="mr">Mail.Ru</button>
</p>
@amal
amal / html.part.html
Created November 28, 2012 19:41 — forked from bladeofsteel/html.part.html
Элементарные социальные share-кнопки. see http://habrahabr.ru/post/156185/ & http://jsfiddle.net/rrZBR/1/
<a href="http://vk.com/share.php?url=URL&title=TITLE&description=DESC&image=IMG_PATH&noparse=true" target="_blank" onclick="return Share.me(this);"> {шарь меня правильно}</a>
<a href="http://www.facebook.com/sharer/sharer.php?s=100&p%5Btitle%5D=TITLE&p%5Bsummary%5D=DESC&p%5Burl%5D=URL&p%5Bimages%5D%5B0%5D=IMG_PATH" target="_blank" onclick="return Share.me(this);">{шарь меня правильно}</a>
<a href="http://connect.mail.ru/share?url=URL&title=TITLE&description=DESC&imageurl=IMG_PATH" target="_blank" onclick="return Share.me(this);">{шарь меня правильно}</a>
<a href="http://www.odnoklassniki.ru/dk?st.cmd=addShare&st.s=1&st.comments=DESC&st._surl=URL" target="_blank" onclick="return Share.me(this);">{шарь меня правильно}</a>
<a href="https://twitter.com/intent/tweet?original_referer=http%3A%2F%2Ffiddle.jshell.net%2F_display%2F&text=TITLE&url=URL" target="_blank" onclick="return Share.me(this)">{шарь меня правильно}</a>​
@amal
amal / awesome-php.md
Created November 1, 2012 08:02 — forked from ziadoz/awesome-php.md
Awesome PHP Libraries

Breaking into Web Development

I work as an analyst contractor, these days my roles are often a mixture of development and management. I have been asked by a countless number of people what they need to do to get the jobs I’m offered – and it’s simpler than most expect. The market for talented developers in the United Kingdom (and in many talent-lite communities around the world) is such that anyone who merely knows what they are doing has a very good chance of getting a job. Even a job contracting (which ordinarily has senior-level requirements).

To become a web developer with a good salary and employment expectations you need skills. Below I’ll provide a plan to get you towards the top of the largest market: PHP Web Development. Advanced knowledge of everything on this list would immediately make you one of the best, so just strive to have an exposure if not a comprehensive understanding (though the *starred points are essential).

When you have completed projects, you can upload them to github (or anot

@amal
amal / bcrypt.php
Created March 18, 2012 17:11 — forked from dzuelke/bcrypt.php
How to use bcrypt in PHP to safely store passwords (PHP 5.3+ only)
<?php
// secure hashing of passwords using bcrypt, needs PHP 5.3+
// see http://codahale.com/how-to-safely-store-a-password/
// salt for bcrypt needs to be 22 base64 characters (but just [./0-9A-Za-z]), see http://php.net/crypt
// just an example; please use something more secure/random than sha1(microtime) :)
$salt = substr(str_replace('+', '.', base64_encode(sha1(microtime(true), true))), 0, 22);
// 2a is the bcrypt algorithm selector, see http://php.net/crypt