Skip to content

Instantly share code, notes, and snippets.

View neilmaledev's full-sized avatar

Neil Male neilmaledev

View GitHub Profile
How to Remove Shortcut Virus From Pendrive / USB Drive.
If your USB drive doesn’t have important files you can try to Format it, but if it contains important files then you are not going to format it.
To Remove Shortcut Virus manually follow the Steps Below.
Step 1. Go to Start and Search for cmd, as it appears in start menu Right Click on it and Click “Run as Administrator“
Step 2. Navigate to Flash Drive by typing its letter. [ Let’s Say it is i ], to find your USB drive letter open “My Computer” and check for the letter, type i: and hit enter.
{
"editor.fontSize": 11,
"editor.letterSpacing": -0.8,
"workbench.colorTheme": "Monokai",
"explorer.autoReveal": false,
"editor.multiCursorModifier": "ctrlCmd"
}
noop = angular.noop;
elevated = false;
var popupStack = $ionicPopup._popupStack;
if (popupStack.length > 0) {
popupStack.forEach(function(popup, index) {
if (popup.isShown === true) {
popup.hide();
popup.remove();
popupStack.pop();
}
@neilmaledev
neilmaledev / angular-sort
Created September 14, 2017 05:10
angular sorting function
alarms.sort(function(a, b) {
a = a.val;
b = b.val;
return a - b;
});
@neilmaledev
neilmaledev / MailChimp.php
Created August 9, 2017 04:58
MailChimp Php Service
<?php
namespace Services;
class MailChimp
{
protected $username;
protected $api_key;
protected $api_url;
protected $list_id;
Step 1: Register for google recaptcha here: https://www.google.com/recaptcha/intro/
Step 2: You can follow the official instruction there or continue reading my simplified instruction
Step 3: Include the google recaptcha api at the bottom of your html head tag
<head>
<script src='https://www.google.com/recaptcha/api.js'></script>
</head>
Step 4: Include google recaptcha at the very end of your html form with the generated key from Step 1
<form>
<div class="g-recaptcha" data-sitekey="this-is-a-generated-key-from-step-1"></div>
@neilmaledev
neilmaledev / Angular centered image inside div (not background image))
Last active February 1, 2017 07:42
Requirements: HTML, BootstrapCSS, LESScss & ANGULARJScontroller
HTML
<div class="banner">
<div class="img-container">
<img id="bannerImg" src="/img/banners/testimonial.jpg" alt="Medisource Testimonial Banner" ng-class="ngClass('bannerImg')"/>
</div>
<div class="content">
<table>
<tr>
<td class="valign-m">
<p class="text-center">
use S3;
===========================
//depends on your credentials
$AWS = [
'key'=> 'youS3Key',
'secret' => 'imBatman',
'bucket' => 'bucketNameHere'];
@neilmaledev
neilmaledev / limithtml-filter.js
Last active September 22, 2016 05:32
i just modified the one that is here http://stackoverflow.com/questions/27064319/angularjs-limitto-using-html-tags. I added auto ellipsis
.filter('limitHtml', function() {
return function(text, limit) {
var changedString = String(text).replace(/<[^>]+>/gm, '');
var length = changedString.length;
return changedString.length > limit ? changedString.substr(0, limit) + '...' : (changedString == 'null' ? '' : changedString);
};
})
.directive('intnum', function () {
return {
require: 'ngModel',
restrict: 'A',
scope: {
intnum: '='
},
link: function (scope, elem, attr, ctrl) {
elem.bind('change', function() {
var value = isNaN(parseInt(ctrl.$viewValue)) ? 1 : parseInt(ctrl.$viewValue);