Skip to content

Instantly share code, notes, and snippets.

View linuxsimba's full-sized avatar

Linux Simba linuxsimba

View GitHub Profile
@linuxsimba
linuxsimba / chocolatey.ps1
Last active December 1, 2022 03:38 — forked from mcasperson/chocolatey.ps1
Chocolatey install
Set-ExecutionPolicy Bypass -Scope Process -Force
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
@linuxsimba
linuxsimba / appspace-user-consent.ps1
Last active June 28, 2021 23:57
user-consent-using-powershell.md (appspace)
@linuxsimba
linuxsimba / _src_tests_test.service.spec.ts
Created February 25, 2021 08:47
NG10/NS7 Test Service unit test
import { customNsTestBedAfterEach, customNsTestBedBeforeEach } from './setup';
import { Injectable } from '@angular/core';
import { TestBed } from '@angular/core/testing';
@Injectable({
providedIn: 'root'
})
export class TestService {
hello(): string {
@linuxsimba
linuxsimba / karma.conf.js
Created February 25, 2021 08:34
NG10/NS7 unit test karma.conf.js
module.exports = function (config) {
const options = {
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: [ 'jasmine' ],
@linuxsimba
linuxsimba / src_tests_test.component.spec.ts
Last active February 25, 2021 08:51
NG10/NG7 unit testing component unit test example
import { Component } from '@angular/core';
import { TestBed } from '@angular/core/testing';
import { customNsTestBedAfterEach, customNsTestBedBeforeEach } from './setup';
@Component({
selector: 'test-comp',
template: '' // template is blank, because code does not have NO_ERRORS_SCHEMA and also we don't care. only testing functions in component
})
class TestComponent{
hello(): string { return 'hello'; }
@linuxsimba
linuxsimba / src_tests_setup.ts
Last active February 25, 2021 08:52
setup.ts file for karma testing NG10/NS7
/* eslint-disable @typescript-eslint/restrict-template-expressions */
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
/* eslint-disable @typescript-eslint/no-unsafe-call */
/* eslint-disable @typescript-eslint/no-unsafe-return */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable no-console */
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
/* PATH /src/tests/setup.ts */
@linuxsimba
linuxsimba / package.json
Created February 25, 2021 08:17
package.json for NG10/NS7 unit testing article
{
"name": "Test App",
"main": "main.js",
"displayName": "Navigation Drawer",
"templateType": "App template",
"version": "7.0.6",
"description": "NativeScript Application",
"author": "NativeScript Team <oss@nativescript.org>",
"license": "SEE LICENSE IN <your-license-filename>",
"publishConfig": {
@linuxsimba
linuxsimba / playbook.yml
Created December 8, 2017 14:03
fake password vault example
---
- hosts: mylist
gather_facts: no
pre_tasks:
- name: get file name
set_fact:
fake_vault_file: "{{ inventory_hostname}}.txt"
- name: get host specific creds from "fake" password vault
set_fact:
creds: "{{ lookup('file', fake_vault_file) | from_yaml }}"
@linuxsimba
linuxsimba / group_vars_all_vars.yml
Last active November 29, 2017 05:03
inventory config
tower_package_name: 'ansible-tower'
tower_package_version: '3.2.1'
tower_package_release: '1'
# BEGIN ANSIBLE MANAGED BLOCK
admin_password: "tower"
pg_host: "postgres1"
pg_port: '5432'
@linuxsimba
linuxsimba / gist:2c62b33e7c01e19d71a9a19f85567bff
Created November 26, 2017 02:15
vagrant --debug halt output run on PXE VM. -- vagrant-libvirt provider
INFO global: Vagrant version: 2.0.0
INFO global: Ruby version: 2.3.4
INFO global: RubyGems version: 2.5.2.1
INFO global: VAGRANT_OLD_ENV_NVM_IOJS_ORG_MIRROR="https://iojs.org/dist"
INFO global: VAGRANT_OLD_ENV_GTK_IM_MODULE="ibus"
INFO global: VAGRANT_OLD_ENV_JAVA_HOME="/usr/lib/jvm/java-8-oracle"
INFO global: VAGRANT_OLD_ENV__system_version="16.04"
INFO global: VAGRANT_OLD_ENV_RUBY_VERSION="ruby-2.3.3"
INFO global: VAGRANT_OLD_ENV_CLUTTER_IM_MODULE="xim"
INFO global: VAGRANT_OLD_ENV_XDG_MENU_PREFIX="gnome-"