Skip to content

Instantly share code, notes, and snippets.

Avatar

Jake Sylvestre jakesyl

View GitHub Profile
@jakesyl
jakesyl / vultr-coreos-bootstrap.sh
Created Oct 16, 2019 — forked from janeczku/vultr-coreos-bootstrap.sh
Cloud-config for CoreOS IPXE deployment on Vultr. Provisioning etcd, fleet, private network and docker compatible firewall. #tags: foo, bar
View vultr-coreos-bootstrap.sh
#!/bin/bash
# Cloud-config for CoreOS IPXE deployment on Vultr
##################################################
# This cloud-config bootstraps CoreOS on /dev/vda and provisions:
# - private ip-address on eth1
# - etcd on private network
# - fleet on private network
# - basic firewall (docker compatible)
# - SSHd security hardening
##################################################
View gist:74682713378a0c2c86d598997c7a7a7b
import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview';
import {
createDropdown,
addToolbarToDropdown
} from '@ckeditor/ckeditor5-ui/src/dropdown/utils';
export default class MergeFields extends Plugin {
static get pluginName() {
return 'mergeFields';
}
View .html
<!DOCTYPE html>
<html lang="en">
<head>
<title>Location</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
@jakesyl
jakesyl / notifications.blade.php
Created Dec 19, 2015 — forked from agarwa13/notifications.blade.php
Laravel 5.1 Blade File that allows us to conveniently notify our users along with any response. Note we are using notifyjs to prettify our notifications.
View notifications.blade.php
<script src="{{asset('/vendor/notifyjs/notify.min.js')}}"></script>
<script>
$(document).ajaxComplete(function(event, xhr, settings){
$( ".log" ).text( "Triggered ajaxComplete handler." );
console.log(xhr.responseText);
response = $.parseJSON(xhr.responseText);
// Check for Notifications and Display Them
if(response.hasOwnProperty('notifications')){
for(var i=0; i< response.notifications.length; i++){
@jakesyl
jakesyl / git-compressing-and-deltas.md
Created Sep 11, 2015 — forked from matthewmccullough/git-compressing-and-deltas.md
Git, Compression, and Deltas - An explanation
View git-compressing-and-deltas.md

Git Compression of Blobs and Packfiles.

Many users of Git are curious about the lack of delta compression at the object (blob) level when commits are first written. This efficiency is saved until the pack file is written. Loose objects are written in compressed, but non-delta format at the time of each commit.

A simple run though of a commit sequence with only the smallest change to the image (in uncompressed TIFF format to amplify the observable behavior) aids the understanding of this deferred and different approach efficiency.

The command sequence:

Create the repo:

@jakesyl
jakesyl / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@jakesyl
jakesyl / gist:f09006e03908f485c07d
Last active Aug 29, 2015 — forked from jordelver/gist:3139365
requires sudo priveleges
View gist:f09006e03908f485c07d

Find the SD card device

In this case, the SD card is /dev/disk4. DO NOT get this wrong or you may destroy all the data on the wrong disk/card/drive.

diskutil list

/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *160.0 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
You can’t perform that action at this time.