Skip to content

Instantly share code, notes, and snippets.

View Archakov06's full-sized avatar

Archakov Dennis Archakov06

View GitHub Profile
@Archakov06
Archakov06 / myfunction.js
Last active April 27, 2017 18:02
My function
$scope.getProblematics = function(callback) {
var url = $scope.makeAPI('/problematics');
$http.get(url, {
headers: {
"Content-Type": "application/json",
"Accept": "application/json",
"auth_token": $.cookie('auth_token')
}
@Archakov06
Archakov06 / js-task-1.md
Created February 10, 2017 08:56 — forked from codedokode/js-task-1.md
Задания на яваскрипт (простые)
document.querySelectorAll('.FriendRequestAdd').forEach(function(e){
e.click()
});
setTimeout(function(){
document.querySelectorAll('.layerCancel').forEach(function(e){
e.click()
});
}, 2000);
@Archakov06
Archakov06 / _reset.sass
Created November 18, 2016 11:32
Reset styles SASS
html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
abbr, address, cite, code,
del, dfn, em, img, ins, kbd, q, samp,
small, strong, sub, sup, var,
b, i,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, figcaption, figure,
@Archakov06
Archakov06 / laravel.sh
Last active November 16, 2016 10:12
Composer laravel alias
composer global require "laravel/installer"
export PATH="~/.composer/vendor/bin:$PATH"
source ~/.bashrc
@Archakov06
Archakov06 / required_inputs.js
Last active November 16, 2016 10:11
Check all required inputs
// if (!$('#fullname').val()) {
// $(this).addClass('error');
// return false;
// }
//
// if (!$('#email').val()) {
// $(this).addClass('error');
// return false;
// }
//
app.directive('validex', function(){
return {
require: 'ngModel',
link: function(scope, element, attrs, modelCtrl) {
modelCtrl.$parsers.push(function (val) {
if (!attrs.validex) return false;
var pattern = attrs.validex;
var flags = attrs.vflags ? attrs.vflags : '';
var exp = new RegExp(pattern,flags);