Skip to content

Instantly share code, notes, and snippets.

Heyner Javier Marmol javymarmol

Block or report user

Report or block javymarmol

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@javymarmol
javymarmol / centos_send_mail.txt
Created Jul 11, 2019
solve "Connection could not be established with host smtp"?
View centos_send_mail.txt
If your SELinux is in enforcing mode, you need to turn on httpd_can_sendmail and httpd_can_network_connect booleans.
You can verify if SELinux status is enforcing by running this command:
$ sestatus
...
Current mode: enforcing
...
Check status of httpd sendmail and network connect booleans:
@javymarmol
javymarmol / php-dyld.md
Created Jul 10, 2019 — forked from hgrimelid/php-dyld.md
php: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.61.dylib
View php-dyld.md

After upgrading to Node v.10.9.0 via Homebrew the following error message was thrown from PHP:

dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.61.dylib
  Referenced from: /usr/local/bin/php
  Reason: image not found

Reinstall PHP to fix, for me that's:

View drawing_polygone.blade.php
<!DOCTYPE html>
<head>
<script
src="https://code.jquery.com/jquery-3.2.1.min.js"
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
crossorigin="anonymous"></script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCicFZLn6DdO4QBY0USNvoGSyPeFA3C_Bg&libraries=drawing"></script>
</head>
<body>
@javymarmol
javymarmol / point_into_polygone
Created Nov 22, 2018
check point into a a polygone
View point_into_polygone
public function checkCoverage2(Request $request){
$y = $request["lat"];
$x = $request["lng"];
$offices = Office::all();
$inside = false;
foreach ($offices as $office){
$zone = json_decode($office->zone);
@javymarmol
javymarmol / EnableDisableInteraction.java
Last active May 25, 2018
Enable Disable interaction for user android
View EnableDisableInteraction.java
//to block user touch events
getWindow().setFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE,
WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
//To get user interaction back
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);
@javymarmol
javymarmol / restoringFragment.java
Created May 10, 2018
restore existing fragment
View restoringFragment.java
private void changeFragment(Fragment f, String tag) {
FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
if (fragmentManager.findFragmentByTag(tag) == null) {
fragmentTransaction.add(R.id.frameContainer, f, tag);
} else {
f = fragmentManager.findFragmentByTag(tag);
fragmentTransaction.replace(R.id.frameContainer, f, tag);
}
fragmentTransaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE).commit();
@javymarmol
javymarmol / enableDisableView.java
Created May 10, 2018
enable o disable view in android
View enableDisableView.java
public static void enableDisableView(View view, boolean enabled) {
view.setEnabled(enabled);
if ( view instanceof ViewGroup ) {
ViewGroup group = (ViewGroup)view;
for ( int idx = 0 ; idx < group.getChildCount() ; idx++ ) {
enableDisableView(group.getChildAt(idx), enabled);
}
}
}
View getLocationAndroid.java
private void getLocation() {
try {
if (canGetLocation) {
Log.d(TAG, "Can get location");
if (isGPS) {
// from GPS
Log.d(TAG, "GPS on");
locationManager.requestLocationUpdates(
LocationManager.GPS_PROVIDER,
@javymarmol
javymarmol / addInfoWindowDrawingManager.js
Created Nov 21, 2017
Add Info window on drawingManager 'overlaycomplete'
View addInfoWindowDrawingManager.js
google.maps.event.addListener(drawingManager, 'overlaycomplete', function(event) {
if (event.type == google.maps.drawing.OverlayType.MARKER) {
//event.overlay.setTitle("Hello");
var infowindow = new google.maps.InfoWindow({
content: '<div id="content" onmouseover="updateContent()">Hello</div>',
maxWidth: 10
});
google.maps.event.addListener(event.overlay,'click',function(){
infowindow.open(map,event.overlay);
});
@javymarmol
javymarmol / getDrawingManagerPolygonPath.js
Created Nov 21, 2017
Extract drawingManager polygon path Google Maps on click
View getDrawingManagerPolygonPath.js
var map; // Global declaration of the map
var iw = new google.maps.InfoWindow(); // Global declaration of the infowindow
var lat_longs = new Array();
var markers = new Array();
var drawingManager;
function initialize() {
var myLatlng = new google.maps.LatLng(40.9403762, -74.1318096);
var myOptions = {
zoom: 13,
You can’t perform that action at this time.