Skip to content

Instantly share code, notes, and snippets.

View SteveEdson's full-sized avatar

Steve Edson SteveEdson

View GitHub Profile
@alexellis
alexellis / INSTRUCTIONS.md
Last active June 21, 2018 15:16
A daemonset for the blinkt
  • Turn off RPis and install Blinkt if you haven't already. Rounded edges should point outwards.
  • Power back up
  • Install Kubernetes (hopefully you've already done this)
  • Download the gist to a temporary file i.e. gist.yml
  • kubectl apply -f gist.yml

Let me know what happens. If you see a red animation going backwards and forwards then everything's working right.

<scheme name="Material Dark" version="142" parent_scheme="Darcula">
<!--
1. Install the Roboto Mono Regular font - https://fonts.google.com/specimen/Roboto+Mono?selection.family=Roboto+Mono
2. Copy `Material Dark.icls` to `~/Library/Preferences/AndroidStudio3.0/colors/`
3. Restart AS
4. Preferences > Editor > Color and Fonts > select Material Dark and press OK
-->
<option name="FONT_SCALE" value="1.0" />
@loo2k
loo2k / wechat-inline-viedeo.html
Last active June 25, 2018 11:11
微信 webview 小窗播放视频解决方案,演示地址 https://luke.cdc.im/wechat-inline-video/
<!--
webkit-playsinline, playsinline 兼容 iOS 内联播放
x5-video-player-type 使 X5内核(QQ浏览器)使用 H5 的方式播放视频
-->
<video
webkit-playsinline
playsinline
x5-video-player-type="h5"
src="https://h5app.qq.com/act/TEG/TEG_recruit3/video/roll.mp4">
</video>
@gbaman
gbaman / HowToOTGFast.md
Last active May 1, 2024 08:26
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)

More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh in the SD card as well. By default SSH i

@frosit
frosit / infectedFiles.md
Created May 5, 2016 22:40
Some commands for finding and clearing infected PHP files

Finding infected files with following bash commands

** Command to list all infected files:

  • grep -lr --include=*.php "eval(base64_decode" /path/to/webroot
  • grep -lr --include=*.php "eval" .
  • grep -lr --include=*.php "base64" .

Command to remove malicious code:

  • grep -lr --include=*.php "eval(base64_decode" /path/to/webroot | xargs sed -i.bak 's/<?php eval(base64_decode[^;]*;/<?php\n/g'
@hfreire
hfreire / qemu_osx_rpi_raspbian_jessie.sh
Last active March 24, 2024 14:35
How to emulate a Raspberry Pi (Raspbian Jessie) on Mac OSX (El Capitan)
# Install QEMU OSX port with ARM support
sudo port install qemu +target_arm
export QEMU=$(which qemu-system-arm)
# Dowload kernel and export location
curl -OL \
https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-4.1.7-jessie
export RPI_KERNEL=./kernel-qemu-4.1.7-jessie
# Download filesystem and export location
@ferdy182
ferdy182 / CircularRevealingFragment.java
Created March 27, 2015 17:18
Make circular reveal animations on a fragment
/**
* Our demo fragment
*/
public static class CircularRevealingFragment extends Fragment {
OnFragmentTouched listener;
public CircularRevealingFragment() {
}
// ============================================================ //
// CAST
// ============================================================ //
window.chrome = {};
window.chrome.cast = {};
window.chrome.cast.isAvailable = true;
window.chrome.cast.initialize = function(a, b, c) { }
window.chrome.cast.ApiConfig = function(a, b, c) {
// This fakes that chromecast is available so the button appears
// call anything other than "available" to fake chromcast dissapearing
@petehamilton
petehamilton / README.md
Last active March 31, 2020 18:18
Circle CI Build Status widget for Dashing (Multiple Builds)

Description

Dashing widget to show the status of builds from CircleCI. Also shows the avatar of the person who is running/breaking/passing the current build.

Usage

  • Get a Circle API Token from your Account Dashboard and set it in your environment as CIRCLE_CI_AUTH_TOKEN
  • Add the httparty to your Gemfile and run bundle install

Then:

@kennydude
kennydude / class.java
Created March 4, 2013 12:37
Custom style *should work roughly*
public static class BigPictureStyle extends Style {
private Bitmap mPicture;
private Bitmap mBigLargeIcon;
private boolean mBigLargeIconSet = false;
public BigPictureStyle() {
}
public BigPictureStyle(Builder builder) {
setBuilder(builder);