Skip to content

Instantly share code, notes, and snippets.

View stenrdj's full-sized avatar
🎯
Focusing

Aziz Segaoui stenrdj

🎯
Focusing
View GitHub Profile
@stenrdj
stenrdj / geolocalisation.js
Created September 8, 2017 11:12
JS - Google maps api get zoomed area markers
private boolean isVisibile(Marker marker)
{
if(googleMap != null)
{
//This is the current user-viewable region of the map
LatLngBounds latLongBounds = googleMap.getProjection().getVisibleRegion().latLngBounds;
if(latLongBounds.contains(marker.getPosition()))
//If the item is within the the bounds of the screen
return true;
@stenrdj
stenrdj / geolocalisation.js
Last active September 20, 2017 10:40
JS - Navigator geolocalisation longitude and latitude
if ("geolocation" in navigator) {
navigator.geolocation.getCurrentPosition(function(position) {
// Yes navigator got geolocation and you got permitions to use it
alert(position.coords.latitude, position.coords.longitude);
});
} else {
alert('sorry your browser not support geolocalisation');
}
@stenrdj
stenrdj / README.md
Created September 20, 2017 10:45 — forked from zenorocha/README.md
A template for Github READMEs (Markdown) + Sublime Snippet

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage

@stenrdj
stenrdj / ResponsiveJS.js
Last active October 19, 2017 14:35
Responsive code for jquery
// On resizing window on desktop
$(window).bind('resize',function(){
if($(window).innerWidth() < 450) {
// your code here for responsive
}else{
//your code here for desktop
}
});
//end
// Checking if its on desktop and make
@stenrdj
stenrdj / docker.txt
Created January 29, 2018 09:56
Docker commands (Stop,Remove container and images)
# Stop all containers
sudo docker stop $(sudo docker ps -a -q)
# Delete all containers
sudo docker rm $(sudo docker ps -a -q)
# Delete all images
sudo docker rmi $(sudo docker images -q)
@stenrdj
stenrdj / drush_admin_create
Created March 16, 2018 11:48 — forked from ecorson/drush_admin_create
Add admin user via Drush
drush user-create adminuser --mail="adminuser@uiowa.edu" --password="UserPw"; drush user-add-role "administrator" adminuser
@stenrdj
stenrdj / DevStandards.MD
Created April 13, 2018 13:01 — forked from sherakama/DevStandards.MD
Stanford Web Services Drupal Development Standards

Drupal Development Standards

by Stanford Web Services
Version: 1.0.0
Date: October 30, 2015

This document is meant to be a comprehensive guide to web development standards for Stanford Web Services around Drupal web development. This document is our canonical source and guide.

Code Standards

@stenrdj
stenrdj / theme_image.php
Created April 13, 2018 13:03 — forked from peteboere/theme_image.php
Drupal theme overrides for better accessibility
<?php
/*
theme_image() override.
*/
function THEME_image($vars)
{
// [Accessibility] Images must always have an alt attribute.
if (! isset($vars['alt'])) {
$vars['alt'] = '';
### --- 04/18/18 | elementaryOS --- ###
alias gc='git commit -am'
alias lsd='ls -la'
alias gco='git co'
alias gs="git status"
# ls aliases
alias ll='ls -alF'
alias la='ls -A'