Skip to content

Instantly share code, notes, and snippets.

View comdotlinux's full-sized avatar
😉
Web Components, Quarkus and GraalVM

Guruprasad Kulkarni comdotlinux

😉
Web Components, Quarkus and GraalVM
View GitHub Profile
@danielkza
danielkza / devilspie2.spec
Last active January 1, 2016 10:19
RPM spec file for devilspie2
Name: devilspie2
Version: 0.31
Release: 1%{?dist}
Summary: A window-matching utility
Group: User Interface/X
License: GPLv3+
URL: http://www.gusnan.se/devilspie2
Source0: http://www.gusnan.se/%{name}/download/%{name}_%{version}-src.tar.gz
@paulsturgess
paulsturgess / Todo.js
Last active June 17, 2017 11:46
Example stateless React Component
import React, { PropTypes } from 'react'
const Todo = ({ onClick, completed, text }) => (
<li
onClick={onClick}
style={{
textDecoration: completed ? 'line-through' : 'none'
}}
>
{text}
anonymous
anonymous / -
Created June 22, 2017 13:40
System: Host: HP-Spectre-x360 Kernel: 4.8.0-53-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: Cinnamon 3.4.1 (Gtk 3.18.9-1ubuntu3.3) dm: lightdm Distro: Linux Mint 18.2 Sonya
Machine: System: HP (portable) product: HP Spectre x360 Convertible 13-w0XX Chassis: type: 31
Mobo: HP model: 827E v: 94.46 Bios: American Megatrends v: F.11 date: 11/18/2016
CPU: Dual core Intel Core i7-7500U (-HT-MCP-) cache: 4096 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 11600
clock speeds: min/max: 400/3500 MHz 1: 799 MHz 2: 799 MHz 3: 799 MHz 4: 799 MHz
Graphics: Card: Intel Device 5916 bus-ID: 00:02.0 chip-ID: 8086:5916
Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa)
Resolution: 1920x1080@60.00hz
@paulsturgess
paulsturgess / Todo.test.js
Last active October 8, 2018 11:22
Testing a stateless component
import React from 'react';
import TestUtils from 'react/lib/ReactTestUtils';
import Todo from './Todo';
describe('Todo', () => {
let instance, li;
let Wrapper = React.createClass({
render: function() {
return this.props.children;
}
@henriquemoody
henriquemoody / sublime-text-2.sh
Last active July 8, 2021 09:54
Install Sublime Text on Fedora.
#!/usr/bin/env bash
# Usage: {script} [ OPTIONS ] TARGET VERSION
#
# TARGET Default target is "/usr/local".
# VERSION If not defined tries to get the build into the Sublime Text 2 website.
#
# OPTIONS
#
# -h, --help Displays this help message.
#
@seratch
seratch / Application.kt
Last active January 28, 2023 00:40
Building Slack apps with Ktor framework
package com.example
import com.slack.api.bolt.App
import com.slack.api.bolt.AppConfig
import com.slack.api.bolt.request.Request
import com.slack.api.bolt.request.RequestHeaders
import com.slack.api.bolt.response.Response
import com.slack.api.bolt.util.QueryStringParser
import com.slack.api.bolt.util.SlackRequestParser
import com.slack.api.model.block.Blocks.asBlocks
@micw
micw / install_jenkins_plugin.sh
Last active August 11, 2023 06:14
Script to install one or more jenkins plugins including dependencies while jenkins is offline
#!/bin/bash
set -e
if [ $# -eq 0 ]; then
echo "USAGE: $0 plugin1 plugin2 ..."
exit 1
fi
plugin_dir=/var/lib/jenkins/plugins
@AdamLJohnson
AdamLJohnson / KubernetesOnWindows.md
Last active September 4, 2023 07:28
How to get Kubernetes running on Windows 10

Kubernetes On Windows

Early in August 2016 Microsoft released the Windows 10 Anniversary Update. There were a number of changes, but the one that got me to actually take the time to install the update was "Bash on Ubuntu on Windows". This feature would install Ubuntu Linux without the kernel. It would run linux in user-mode. Linux would run the commands while Windows does all the work/processing.

For an upcoming project I needed to get Kubernetes running. Being as Kubernetes is not able to be run in Windows the normally accepted way to procees is to create a virtual Linux box and run it from there. I wanted to see if Kubernetes would run in Bash on Ubuntu on Windows.

This is how I got it to work:

Install the Windows 10 Anniversary Update

@pojntfx
pojntfx / main.sh
Last active November 4, 2023 12:34
GPU-accelerated, UEFI-, Secure Boot, TPM 2.0, audio- and webcam-enabled QEMU using Virgil 3D or Spice and QXL
qemu-system-x86_64 -enable-kvm -m 4096 -smp $(nproc) -cpu host -device ac97 -audiodev alsa,id=snd0,out.buffer-length=500000,out.period-length=726 -usb -device usb-tablet -device virtio-keyboard-pci -net nic -net user -cdrom distro.iso
# For Virgil 3D GPU acceleration (fast but Linux-only):
-device virtio-vga-gl
# For QXL GPU acceleration (slower but more compatible):
-device qxl
# For GTK display:
-display gtk,gl=on,grab-on-hover=on
# For SDL display:
-display sdl,gl=on
# For Spice display:
@lizthegrey
lizthegrey / attributes.rb
Last active February 24, 2024 14:11
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'