Skip to content

Instantly share code, notes, and snippets.

View schwarzeni's full-sized avatar
📚
good good study, day day up

schwarzeni

📚
good good study, day day up
View GitHub Profile
@hellokaton
hellokaton / README.md
Last active March 29, 2024 02:33
Go 的信号处理和优雅退出

每个平台的信号定义或许有些不同。下面列出了POSIX中定义的信号。 Linux 使用34-64信号用作实时系统中。 命令man 7 signal提供了官方的信号介绍。

在POSIX.1-1990标准中定义的信号列表

@rudolfratusinski
rudolfratusinski / parallels_tools_ubuntu_new_kernel_fix.md
Last active November 23, 2022 20:01
Parallels Tools fix for Ubuntu 18.04 and other Linux distributions with Kernel version >= 4.15

Preparation

  • In open Ubuntu 18.04 machine click Parallels Actions -> "Install Parallels Tools"

  • A "Parallels Tools" CD will popup on your Ubuntu desktop.

  • Open it by double mouse click, copy all the content to a new, empty directory on a desktop, name it for e.g. "parallels_fixed"

  • Open terminal, change directory to parallels_fixed (cd ~/Desktop/parallels_fixed)

  • Make command line installer executable (chmod +x install)

  • Change directory to "installer" (cd installer)

  • Make few other scripts executable: chmod +x installer.* *.sh prl_*

@480
480 / gist:3b41f449686a089f34edb45d00672f28
Last active April 11, 2024 23:56
MacOS X + oh my zsh + powerline fonts + visual studio code terminal settings

MacOS X + oh my zsh + powerline fonts + visual studio code (vscode) terminal settings

Thank you everybody, Your comments makes it better

Install oh my zsh

http://ohmyz.sh/

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
@F21
F21 / gist:08bfc2e3592bed1e931ec40b8d2ab6f5
Last active October 23, 2022 12:36
Minikube RBAC Quick Start
minikube start --kubernetes-version=v1.7.0 --extra-config=apiserver.Authorization.Mode=RBAC
kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default
minikube dashboard
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
@vbelcik
vbelcik / dropdown.directive.ts
Created May 15, 2017 07:36
Angular4 dropdown directive for bootstrap - enhanced
import { Directive, HostListener, HostBinding, OnDestroy } from '@angular/core';
@Directive({
selector: '[appDropdown]'
})
export class DropdownDirective implements OnDestroy {
private timer = null;
private isMouseInside: boolean = false;
@HostBinding('class.open') isOpen: boolean = false;
@wesleyegberto
wesleyegberto / web.xml
Created March 7, 2017 22:29
web.xml for Servlet 3.1
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
</web-app>
// (c) 2017 Yami Odymel
// This code is licensed under MIT license.
package main
import (
"fmt"
"html"
"strconv"
)
@AlexisLeon
AlexisLeon / rn.input-numbers.js
Created January 15, 2017 04:28
TextInput accepts only numbers - React Native
import React, { Component } from 'react';
import { TextInput } from 'react-native';
class Input extends Component {
constructor(props) {
super(props);
this.state = {
text: ''
};
}
@wycliffepeart
wycliffepeart / merge-object.js
Last active December 8, 2020 03:32
Javascript Object.assign Alternative . The mergeObject() method is used to copy the values of all enumerable own properties from one or more source objects to a target object. It will return the target object.
function mergeObject(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (source.hasOwnProperty(key)) {
target[key] = source[key];
}
}
}
return target;