Skip to content

Instantly share code, notes, and snippets.

View deitch's full-sized avatar

Avi Deitcher deitch

View GitHub Profile
set default=0
set timeout=10
set gfxmode=auto
insmod efi_gop
insmod efi_uda
menuentry "MyOS" {
search.fs_label SOMELABEL root
set gfxpayload=keep
$ xorriso -indev dist/artifacts/testos.iso -report_el_torito cmd
xorriso 1.4.2 : RockRidge filesystem manipulator, libburnia project.
xorriso : NOTE : Loading ISO image tree from LBA 0
xorriso : UPDATE : 12 nodes read in 1 seconds
xorriso : NOTE : Detected El-Torito boot information which currently is set to be discarded
Drive current: -indev 'dist/artifacts/testos.iso'
Media current: stdio file, overwriteable
Media status : is written , is appendable
Boot record : El Torito , MBR isohybrid cyl-align-on GPT
#!/bin/sh
ask_for_password () {
cryptkey="Unlocking the disk $cryptsource ($crypttarget)\nEnter passphrase: "
if [ -x /bin/plymouth ] && plymouth --ping; then
cryptkeyscript="plymouth ask-for-password --prompt"
cryptkey=$(printf "$cryptkey")
else
cryptkeyscript="/lib/cryptsetup/askpass"
fi
FROM ubuntu
RUN echo hello > /tmp/foo
{
"brand": "lx",
"image_uuid": "36c1c12a-1b7e-11e5-8f38-eba28d6b3ec6",
"alias": "vPerf2LMPA_66",
"hostname": "vPerf2LMPA",
"quota": 100,
"kernel_version": "2.6.32",
"resolvers": ["172.16.5.10","172.16.5.11"],
"nics": [
{
{
"brand": "lx",
"image_uuid": "36c1c12a-1b7e-11e5-8f38-eba28d6b3ec6",
"alias": "vPerf2LMPA_66",
"hostname": "vPerf2LMPA",
"quota": 100,
"kernel_version": "2.6.32",
"nics": [
{
"nic_tag": "external",
@deitch
deitch / jstreegrid-patch.js
Created September 3, 2015 05:37
jstreegrid patch test
/*
* http://github.com/deitch/jstree-grid
*
* This plugin handles adding a grid to a tree to display additional data
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
*
* Works only with jstree version >= 3.0.0
*
@deitch
deitch / setCookie
Created April 1, 2015 09:31
setCookie()
var setCookie = function (key, value, options) {
var result = null, decode, days, t, i, pair, pairs, opts = options;
// key and value given, set cookie...
if (arguments.length > 1 && (value === null || typeof(value) !== "object")) {
opts = opts || {};
if (value === null) {
opts.expires = -1;
}
// directive
.directive('resetSearchModel',function () {
return {
restrict: 'A',
require: ['^ngModel','uiSelect'],
link: function (scope, element, attrs, ctrls) {
if (attrs.resetSearchModel === "true" || attrs.resetSearchModel === true) {
scope.$watch(attrs.ngModel,function (newval,oldval,scope) {
scope.$select.selected = undefined;
});
factory('Resource',['$resource',function ($resource) {
return function(url,params,methods){
var defaults = {
update: { method: 'put', isArray: false },
patch: { method: 'patch', isArray: false },
create: { method: 'post' }
}, resource = $resource(url,params,angular.extend(defaults,methods)), urlParams = {};
// need to change $save *after* creating $resource
resource.prototype.$save = function() {