Skip to content

Instantly share code, notes, and snippets.

View AurelioDeRosa's full-sized avatar

Aurelio De Rosa AurelioDeRosa

View GitHub Profile
@AurelioDeRosa
AurelioDeRosa / coins.md
Last active July 9, 2018 06:20
CPU-minable coins

CPU-minable coins

This file records the cpu-minable coins that I've experimented with. My goal is to keep a list of those that can be mined with a normal machine, like a home laptop, and are profitable. My definition of profitable is a coin that you can mine while using the machine for normal activities, like browsing the web, obtaining at least 1-2 coins per hour.

Last update: 06/01/2018

Profitable

@AurelioDeRosa
AurelioDeRosa / cloudSettings
Last active April 22, 2019 03:26
Visual Studio Code Sync Settings GIST
{"lastUpload":"2019-04-22T03:26:20.281Z","extensionVersion":"v3.2.9"}
@AurelioDeRosa
AurelioDeRosa / main.js
Last active June 20, 2016 09:57
Test if the options parameter of addEventListener() is supported and which options are available
function getOptionsAvailable() {
var optionsAvailable = {
capture: false,
passive: false,
once: false
};
try {
var eventListenerOptions = {};
@AurelioDeRosa
AurelioDeRosa / sum-strings.js
Created January 17, 2016 17:51
Sum stings representing numbers
/*
* Exercise:
*
* Given the string representations of a variable number of integers,
* write a function that returns the string representation of the sum of
* those integers. The function must return the correct result even
* if the sum of the numbers exceeds the maximum number allowed
* (Number.MAX_VALUE). In addition, it must work with negative integers.
*/
@AurelioDeRosa
AurelioDeRosa / dataset-api-shim.js
Created November 2, 2015 00:16
Simple shim for the Dataset API
// Shim for the Dataset API to set and get data
var data = (function() {
var supported = 'dataset' in document.createElement('div');
return function(element, property, value) {
if (arguments.length === 2) {
return supported ? element.dataset[property] : element.getAttribute('data-' + property);
} else if (arguments.length === 3) {
return supported ? element.dataset[property] = value : element.setAttribute('data-' + property, value);
}
};
@AurelioDeRosa
AurelioDeRosa / cherry-pick.txt
Created June 8, 2015 21:02
Git commands to cherry pick commits
git checkout -b otherrepo-master master
git pull https://github.com/otherrepo/my-repo-name.git master
git checkout master
git cherry-pick --strategy=recursive -X theirs <commit-hash>
git log
git branch -D otherrepo-master
git push origin master
@AurelioDeRosa
AurelioDeRosa / .csslintrc
Created May 6, 2015 23:06
.csslintrc by Aurelio De Rosa
{
"adjoining-classes": true,
"box-model": false,
"box-sizing": false,
"bulletproof-font-face": 2,
"compatible-vendor-prefixes": false,
"display-property-grouping": true,
"duplicate-background-images": 2,
"duplicate-properties": 2,
"empty-rules": 2,
@AurelioDeRosa
AurelioDeRosa / mysql-restart.sh
Created April 18, 2015 19:27
Script to restart MySQL if it goes down
#!/bin/sh
ps auxw | grep mysql | grep -v grep
if [ $? != 0 ]
then
sudo service mysql start
fi