Skip to content

Instantly share code, notes, and snippets.

View fdorantesm's full-sized avatar

Fernando Dorantes fdorantesm

View GitHub Profile
@ievans
ievans / index.js
Created June 6, 2019 17:49
electron-native-notify-1.1.6 malicious source code
const MainProcessNotification = require("electron").Notification;
const isRenderer = process && process.type === "renderer";
const isSupported = () => isRenderer ? "Notification" in window : MainProcessNotification.isSupported();
const renderNotify = (title, body) => {
const notification = new Notification(title, {
body: body
});
return notification
};
try {
@ibraheem4
ibraheem4 / postgres-brew.md
Last active March 20, 2024 11:33 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@480
480 / gist:3b41f449686a089f34edb45d00672f28
Last active February 29, 2024 02:55
MacOS X + oh my zsh + powerline fonts + visual studio code terminal settings

MacOS X + oh my zsh + powerline fonts + visual studio code (vscode) terminal settings

Thank you everybody, Your comments makes it better

Install oh my zsh

http://ohmyz.sh/

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
@kerimdzhanov
kerimdzhanov / random.js
Last active November 12, 2023 15:11
JavaScript: get a random number from a specific range
/**
* Get a random floating point number between `min` and `max`.
*
* @param {number} min - min number
* @param {number} max - max number
* @return {number} a random floating point number
*/
function getRandomFloat(min, max) {
return Math.random() * (max - min) + min;
}
@joyrexus
joyrexus / README.md
Last active February 19, 2024 17:15 — forked from liamcurry/gist:2597326
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})