Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Zak zakgrant

🎯
Focusing
Block or report user

Report or block zakgrant

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
@mdecorte
mdecorte / createUsefulAssetManifest.js
Last active Jul 17, 2019
Script to create a useful asset-manifest file for CRA-2 that only contains paths to assets needed on page load
View createUsefulAssetManifest.js
const fs = require('fs')
const path = require('path')
// for CRA-2 un-comment line 5 and comment line 6
// const assetManifest = require('./build/asset-manifest.json')
const assetManifest = require('./build/asset-manifest.json')[files]
const indexFilePath = path.join(__dirname, 'build/index.html')
const BUILD_PATH = path.join(__dirname, 'build/useful-asset-manifest.json')
@tzapu
tzapu / docker-compose.yml
Last active Aug 18, 2019
docker compose file for local server, plex, transmission, sonarr, radarr, ombi, netdata, nextcloud
View docker-compose.yml
version: '2.1'
services:
transmission:
container_name: transmission
image: dperson/transmission
restart: unless-stopped
depends_on:
- plex
network_mode: host
environment:
@martinwicke
martinwicke / automobile.ipynb
Last active Feb 11, 2019
Estimator demo using Automobile dataset
View automobile.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@martinwoodward
martinwoodward / PInvokeSamples.cs
Created Jun 28, 2016
Example of PInvoke from Linux with .NET Core
View PInvokeSamples.cs
using System.Runtime.InteropServices;
namespace PInvokeSamples {
public static class Program {
// Import the libc and define the method corresponding to the native function.
[DllImport("libc.so.6")]
private static extern int getpid();
public static void Main(string[] args){
@mirague
mirague / CustomComponent-test.js
Last active Mar 27, 2019
Testing React-Intl components with Enzyme's mount() and shallow() methods. This is a helper function which wraps the `intl` context around your component tests in an easy and efficient way.
View CustomComponent-test.js
import { mountWithIntl } from 'helpers/intl-enzyme-test-helper.js';
const wrapper = mountWithIntl(
<CustomComponent />
);
expect(wrapper.state('foo')).to.equal('bar'); // OK
expect(wrapper.text()).to.equal('Hello World!'); // OK
@bentheax
bentheax / 2015-11-yadm.md
Created Jan 22, 2016
How to manage dotfiles with YADM
View 2015-11-yadm.md

Background

Solutions I've tried

  • Git repo directly checked out in home directory

    • Noisy
    • Have to ignore *, everything is a --force
    • Juggling machine variations is a pain
  • Homesick / Homeshick

@NicholasTD07
NicholasTD07 / how-to-download-iOS-simulator-in-command-line-and-install-it.md
Last active Jul 4, 2019
How to Download iOS Simulator (Xcode) in Command Line and Install it
View how-to-download-iOS-simulator-in-command-line-and-install-it.md

How to Download iOS Simulator (Xcode) in Command Line and Install it

For faster connection speed and more flexibility.

Steps

  1. Start Xcode in command line by running this in commandline /Applications/Xcode.app/Contents/MacOS/Xcode
  2. Start downloading of the simulator
  3. Cancel it. YES CANCEL IT!
  4. You will get a message like this:
@amercier
amercier / synology-scheduled-tasks.md
Last active Jun 9, 2019
Turn leds on/off on Synology DiskStation
View synology-scheduled-tasks.md

Synology scheduled tasks

Usage

Go to Control Panel / Task Scheduler and add the content of these scripts as root scripts.

Leds

View Gruntfile.js
// Generated on 2014-12-15 using
// generator-webapp 0.5.1
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// If you want to recursively match all subfolders, use:
// 'test/spec/**/*.js'
View example.js
var browserSync = require("browser-sync");
browserSync.use({
plugin: function () { /* noop */},
hooks: {
'client:js': require("fs").readFileSync("./reloader.js", "utf-8") // Link to your file
}
});
browserSync({
You can’t perform that action at this time.