Skip to content

Instantly share code, notes, and snippets.

@crazycode
crazycode / monitor.py
Created July 18, 2020 16:34
树莓派monitor
#!/usr/bin/env python
import os
import time
#show raspberry temperature,CPU,memory
def getCPUtemp():
temp = os.popen('vcgencmd measure_temp').readline()
tempfloat = float(temp.replace('temp=','').replace('\'C\n',''))
print 'CPU Temperature is now %.1f Centigrade' % tempfloat
@crazycode
crazycode / monitor.py
Created July 18, 2020 16:34
树莓派monitor
#!/usr/bin/env python
import os
import time
#show raspberry temperature,CPU,memory
def getCPUtemp():
temp = os.popen('vcgencmd measure_temp').readline()
tempfloat = float(temp.replace('temp=','').replace('\'C\n',''))
print 'CPU Temperature is now %.1f Centigrade' % tempfloat
@crazycode
crazycode / git-remove-branches
Created April 15, 2019 11:13 — forked from TBonnin/git-remove-branches
Safely remove local fully merged branches
#!/bin/bash
# This has to be run from master
git checkout master
# Update our list of remotes
git fetch
git remote prune origin
# Remove local fully merged branches
@crazycode
crazycode / spring-boot应用自启动脚本.sh
Created January 4, 2017 01:38
/etc/init.d/spring-rule-gateway
#!/bin/bash
#
# . ____ _ __ _ _
# /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
# ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
# \\/ ___)| |_)| | | | | || (_| | ) ) ) )
# ' |____| .__|_| |_|_| |_\__, | / / / /
# =========|_|==============|___/=/_/_/_/
# :: Spring Boot Startup Script ::
#
@crazycode
crazycode / cloud-registry自启动脚本.sh
Created January 4, 2017 01:37
/etc/init.d/spring-cloud-registry
#!/bin/bash
#
# . ____ _ __ _ _
# /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
# ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
# \\/ ___)| |_)| | | | | || (_| | ) ) ) )
# ' |____| .__|_| |_|_| |_\__, | / / / /
# =========|_|==============|___/=/_/_/_/
# :: Spring Boot Startup Script ::
#
@crazycode
crazycode / .editorconfig
Created June 6, 2016 04:00
.editorconfig
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org
root = true
[*]
# Change these settings to your own preference
indent_style = space
@crazycode
crazycode / init.gradle
Created May 18, 2016 06:38
.gradle/init.gradle
allprojects {
buildscript {
repositories {
mavenLocal()
maven { url 'http://localhost:8081/nexus/content/groups/public' }
jcenter()
maven { url 'http://repo.spring.io/plugins-release' }
maven { url 'http://repo.spring.io/milestone' }
maven { url "https://plugins.gradle.org/m2/" }
}
@crazycode
crazycode / settings.xml
Created May 10, 2016 05:10
maven $HOME/.m2/settings.xml
<settings>
<mirrors>
<mirror>
<!--This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://nexus.adxage.local:8381/nexus/content/groups/public</url>
</mirror>
</mirrors>
<profiles>
@crazycode
crazycode / fig.yml
Created April 24, 2015 08:33
fig for gitlab
postgresql:
image: sameersbn/postgresql:9.4
volumes:
- ./postgresql-data:/var/lib/postgresql
environment:
- DB_USER=gitlab
- DB_PASS=secretpassword
- DB_NAME=gitlabhq_production
gitlab:
image: sameersbn/gitlab:7.10.0
From 8ab91751069e391a95151c6716a546b1732ade92 Mon Sep 17 00:00:00 2001
From: JP <twitter:canoeberry>
Date: Sun, 19 Jan 2014 11:58:54 +0000
Subject: [PATCH] partial memleak fix
This patch was created by JP (twitter: @canoeberry) based on a memleak fix by Dirk (emacs committer) below:
https://github.com/mirrors/emacs/commit/57ae6509a3b6a274f89b9caea0284c6156470625
This memory leak is fixed in the trunk as of now and will be in the next official release: 24.4.