Skip to content

Instantly share code, notes, and snippets.

Fabien fabslab

Block or report user

Report or block fabslab

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
@alirobe
alirobe / reclaimWindows10.ps1
Last active Oct 12, 2019
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
View reclaimWindows10.ps1
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Modified by: alirobe <alirobe@alirobe.com> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
@RReverser
RReverser / better-console-log.js
Last active May 9, 2019
Better console.log in Node
View better-console-log.js
// UPD:
// Now available as npm module!
// Check out https://github.com/RReverser/better-log for details.
console.log = (function (log, inspect) {
return function () {
return log.apply(this, Array.prototype.map.call(arguments, function (arg) {
return inspect(arg, { depth: 1, colors: true });
}));
};
@getify
getify / gist:5289182
Last active Sep 7, 2016
comparing Object.create() object linkage to `new` constructor linkage
View gist:5289182
// making objects linked via Object.create()
var Foo = Object.create(null);
Foo.me = "Foo";
Foo.identify = function() {
console.log("Me: " + this.me);
};
var Bar = Object.create(Foo);
Bar.me = "Bar";
View .bashrc
# MAC manipulators
alias random_mac='sudo ifconfig en0 ether `openssl rand -hex 6 | sed "s/\(..\)/\1:/g; s/.$//"`'
alias restore_mac='sudo ifconfig en0 ether YOUR_ORIGINAL_MAC_ADDRESS_GOES_HERE'
@davetron5000
davetron5000 / Functional.java
Created Jan 20, 2013
More functional version of the take 25 squares integers thing
View Functional.java
import java.util.*;
public class Functional {
public static void main(String args[]) {
System.out.println(squaresOf(integers()).take(25).toList());
}
private static List<Integer> take(int numToTake, RichIterable<Integer> seq) {
List<Integer> results = new ArrayList<Integer>();
Iterator<Integer> iterator = seq.iterator();
@72lions
72lions / concat.array.buffers.js
Created Jan 14, 2013
Concatenates two ArrayBuffers
View concat.array.buffers.js
/**
* Creates a new Uint8Array based on two different ArrayBuffers
*
* @private
* @param {ArrayBuffers} buffer1 The first buffer.
* @param {ArrayBuffers} buffer2 The second buffer.
* @return {ArrayBuffers} The new ArrayBuffer created out of the two.
*/
var _appendBuffer = function(buffer1, buffer2) {
var tmp = new Uint8Array(buffer1.byteLength + buffer2.byteLength);
@furf
furf / _.deep.js
Created Jul 30, 2012
underscore.js mixin for plucking nested properties
View _.deep.js
_.mixin({
// Get/set the value of a nested property
deep: function (obj, key, value) {
var keys = key.replace(/\[(["']?)([^\1]+?)\1?\]/g, '.$2').replace(/^\./, '').split('.'),
root,
i = 0,
n = keys.length;
You can’t perform that action at this time.