Skip to content

Instantly share code, notes, and snippets.

View MohamedGamil's full-sized avatar

Mohamed Gamil MohamedGamil

View GitHub Profile
@MohamedGamil
MohamedGamil / app-quote-new.js
Created September 4, 2023 12:29
Fixed "app-quote-new.js" JS file
/**
* Get a quote App
*
*/
(function() {
function QuoteFormController(
$rootScope,
$scope,
$http,
$timeout,
@MohamedGamil
MohamedGamil / 2D-Array-DS.js
Last active August 17, 2023 06:05
HackerRank: 2D Array - DS (Solution)
'use strict';
const fs = require('fs');
process.stdin.resume();
process.stdin.setEncoding('utf-8');
let inputString = '';
let currentLine = 0;
@MohamedGamil
MohamedGamil / Matrix-Layer-Rotation-Solution.js
Last active August 17, 2023 05:55
HackerRank: Matrix Layer Rotation (Solution)
'use strict';
process.stdin.resume();
process.stdin.setEncoding('utf-8');
let inputString = '';
let currentLine = 0;
process.stdin.on('data', function(inputStdin) {
inputString += inputStdin;
@MohamedGamil
MohamedGamil / infectedFiles.md
Created August 24, 2022 11:18 — forked from frosit/infectedFiles.md
Some commands for finding and clearing infected PHP files

Finding infected files with following bash commands

** Command to list all infected files:

  • grep -lr --include=*.php "eval(base64_decode" /path/to/webroot
  • grep -lr --include=*.php "eval" .
  • grep -lr --include=*.php "base64" .

Command to remove malicious code:

  • grep -lr --include=*.php "eval(base64_decode" /path/to/webroot | xargs sed -i.bak 's/<?php eval(base64_decode[^;]*;/<?php\n/g'
@MohamedGamil
MohamedGamil / hackerrank--number-line-jumps.js
Created April 17, 2022 07:08
HackerRank / Number Line Jumps
'use strict';
const fs = require('fs');
process.stdin.resume();
process.stdin.setEncoding('utf-8');
let inputString = '';
let currentLine = 0;
@MohamedGamil
MohamedGamil / hackerrank--apple-and-orange.js
Last active April 17, 2022 07:07
HackerRank / Apple and Orange
'use strict';
process.stdin.resume();
process.stdin.setEncoding('utf-8');
let inputString = '';
let currentLine = 0;
process.stdin.on('data', function(inputStdin) {
inputString += inputStdin;
@MohamedGamil
MohamedGamil / hackerrank--grading-students.js
Created April 17, 2022 06:43
HackerRank / Grading Students
'use strict';
const fs = require('fs');
process.stdin.resume();
process.stdin.setEncoding('utf-8');
let inputString = '';
let currentLine = 0;
@MohamedGamil
MohamedGamil / hackerrank--simple-array-sumjs
Created April 17, 2022 06:19
HackerRank / Simple Array Sum
'use strict';
const fs = require('fs');
process.stdin.resume();
process.stdin.setEncoding('utf-8');
let inputString = '';
let currentLine = 0;
@MohamedGamil
MohamedGamil / hackerrank--compare-the-triplets.js
Created April 17, 2022 06:17
HackerRank / Compare the Triplets
'use strict';
const fs = require('fs');
process.stdin.resume();
process.stdin.setEncoding('utf-8');
let inputString = '';
let currentLine = 0;
@MohamedGamil
MohamedGamil / hackerrank--big-sum.js
Created April 17, 2022 06:16
HackerRank / A Very Big Sum
'use strict';
const fs = require('fs');
process.stdin.resume();
process.stdin.setEncoding('utf-8');
let inputString = '';
let currentLine = 0;