-
Open Terminal move to your home folder:
cd ~
-
Enable git colors:
git config --global color.ui true
-
Make a file called ".colors":
touch .colors
-
Open .colors and paste the following:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function jdecoder($json_str) { | |
$cyr_chars = array ( | |
'\u0430' => 'а', '\u0410' => 'А', | |
'\u0431' => 'б', '\u0411' => 'Б', | |
'\u0432' => 'в', '\u0412' => 'В', | |
'\u0433' => 'г', '\u0413' => 'Г', | |
'\u0434' => 'д', '\u0414' => 'Д', | |
'\u0435' => 'е', '\u0415' => 'Е', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fancyAlert(msg) { | |
jQuery.fancybox({ | |
'modal' : true, | |
'content' : "<div style=\"margin:1px;width:240px;\">"+msg+"<div style=\"text-align:right;margin-top:10px;\"><input style=\"margin:3px;padding:0px;\" type=\"button\" onclick=\"jQuery.fancybox.close();\" value=\"Ok\"></div></div>" | |
}); | |
} | |
function fancyConfirm(msg,callback) { | |
var ret; | |
jQuery.fancybox({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?PHP | |
# JSONP "callback" param explanation, via basic PHP script. | |
# | |
# "Cowboy" Ben Alman | |
# http://benalman.com/ | |
# Set $data to something that will be serialized into JSON. You'll undoubtedly | |
# have your own code for this. | |
$data = array("some_key" => "some_value"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2017-10-24T13:19:40.881Z","extensionVersion":"v2.8.3"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Для вызова функции не чаще чем в указанный интервал времени | |
var my_debounce = function(func, wait) { | |
var timeout; | |
return function() { | |
var context = this, | |
args = arguments, | |
later = function() { | |
timeout = null; | |
func.apply(context, args); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Wide-open CORS config for nginx | |
# | |
location / { | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Allow-Origin' '*'; | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Account.constant('PhoneCodesDictionary', [ | |
{ "mask": "+247-####", "cc": "AC", "name_en": "Ascension", "desc_en": "", "name_ru": "Остров Вознесения", "desc_ru": "" }, | |
{ "mask": "+376-###-###", "cc": "AD", "name_en": "Andorra", "desc_en": "", "name_ru": "Андорра", "desc_ru": "" }, | |
{ "mask": "+971-5#-###-####", "cc": "AE", "name_en": "United Arab Emirates", "desc_en": "mobile", "name_ru": "Объединенные Арабские Эмираты", "desc_ru": "мобильные" }, | |
{ "mask": "+971-#-###-####", "cc": "AE", "name_en": "United Arab Emirates", "desc_en": "", "name_ru": "Объединенные Арабские Эмираты", "desc_ru": "" }, | |
{ "mask": "+93-##-###-####", "cc": "AF", "name_en": "Afghanistan", "desc_en": "", "name_ru": "Афганистан", "desc_ru": "" }, | |
{ "mask": "+1(268)###-####", "cc": "AG", "name_en": "Antigua & Barbuda", "desc_en": "", "name_ru": "Антигуа и Барбуда", "desc_ru": "" }, | |
{ "mask": "+1(264)###-####", "cc": "AI", "name_en": "Anguilla", "desc_en": "", "name_ru": "Ангилья", "desc_ru": "" }, | |
OlderNewer