Skip to content

Instantly share code, notes, and snippets.

View alixcan's full-sized avatar
💭
I may be slow to respond.

Alican alixcan

💭
I may be slow to respond.
View GitHub Profile
@alixcan
alixcan / custom.Js
Created June 4, 2012 11:23
Jquery Aktif Link Class Atamak
$(function(){
var pathname = (window.location.pathname.match(/[^\/]+$/)[0]);
$(".nav li a").removeClass("active");
$(".nav li").addClass("active");
});
@alixcan
alixcan / snippet.js
Created October 9, 2012 19:16
JavaScript: jQuery Pop-Out (Chrome)
$(function(){
function popout(){
window.open(window.location.href,'popup','width=' + $('body').outerWidth() + ',height=' + window.screen.height + ',top='+ 0 +',screenY='+ 0 +',left='+ (window.screen.width - $('body').outerWidth()) +',screenX='+ (window.screen.width - $('body').outerWidth()) + ',toolbar=no,scrollbars=yes,location=no,resizable =no');
window.close();
}
$('#popout').on('click', function() {
popout();
});
@alixcan
alixcan / List-Grid.html
Created May 30, 2012 09:38
Grid - List HTML - CSS - jQuery
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<style type="text/css">
@alixcan
alixcan / jquery-cookie.js
Created March 21, 2017 09:19
jquery set coocie
@alixcan
alixcan / array_combinations.php
Created May 14, 2017 08:23
PHP array combinations
<?php
function combinations($arrays, $i = 0) {
if (!isset($arrays[$i])) {
return array();
}
if ($i == count($arrays) - 1) {
return $arrays[$i];
}
// get combinations from subsequent arrays
@alixcan
alixcan / laravel.js
Created March 29, 2018 23:48 — forked from JeffreyWay/laravel.js
Want to send a DELETE request when outside of a form? This will handle the form-creation bits for you dynamically, similar to the Rails implementation. (Requires jQuery, but doesn't have to.) To use, import script, and create a link with the `data-method="DELETE"` attribute.
/*
<a href="posts/2" data-method="delete"> <---- We want to send an HTTP DELETE request
- Or, request confirmation in the process -
<a href="posts/2" data-method="delete" data-confirm="Are you sure?">
*/
(function() {
@alixcan
alixcan / laravel.js
Created March 30, 2018 00:11 — forked from roNn23/laravel.js
Updated delete-script of Jeffrey Way to work with Laravel 5. And optimized the implementation for the CSRF token.
/*
<a href="posts/2" data-method="delete"> <---- We want to send an HTTP DELETE request
- Or, request confirmation in the process -
<a href="posts/2" data-method="delete" data-confirm="Are you sure?">
Add this to your view:
<script>
window.csrfToken = '<?php echo csrf_token(); ?>';
@alixcan
alixcan / directives.php
Created April 6, 2018 14:21 — forked from kelixlabs/directives.php
Laravel Blade Directive To Set Active Menu Class
<?php
Blade::directive('active', function ($expression) {
return "<?php echo active_url($expression); ?>";
});
@alixcan
alixcan / EloquentCheatSheet.md
Created April 27, 2018 15:02 — forked from avataru/EloquentCheatSheet.md
Eloquent relationships cheat sheet
@alixcan
alixcan / RarBgListImages.md
Created April 29, 2018 17:03
RarBg ListImages