Skip to content

Instantly share code, notes, and snippets.

View nicolaballotta's full-sized avatar
🏠
Working from home

Nicola Ballotta nicolaballotta

🏠
Working from home
View GitHub Profile
@nicolaballotta
nicolaballotta / gist:9069656
Last active August 29, 2015 13:56
Serial Camera Kit
// File SerialCamera_DemoCode_CJ-OV528.ino
// 8/8/2013 Jack Shao
// Demo code for using seeeduino or Arduino board to cature jpg format
// picture from seeed serial camera and save it into sd card. Push the
// button to take the a picture .
// For more details about the product please check http://www.seeedstudio.com/depot/
#include <arduino.h>
#include <SPI.h>
@nicolaballotta
nicolaballotta / cloud.sh
Created October 23, 2015 15:07
Switch on/off iCloud sync service
#!/bin/bash
function cloudOn {
launchctl load /System/Library/LaunchDaemons/com.apple.nsurlstoraged.plist
launchctl load /System/Library/LaunchAgents/com.apple.nsurlsessiond.plist
sudo launchctl load /System/Library/LaunchDaemons/com.apple.nsurlsessiond.plist
sudo launchctl load /System/Library/LaunchDaemons/com.apple.nsurlstoraged.plist
}
function cloudOff {
@nicolaballotta
nicolaballotta / 0_reuse_code.js
Created December 30, 2015 09:30
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
This file has been truncated, but you can view the full file.
{
"dependencies": {
"express": {
"version": "4.13.3",
"from": "[email protected]",
"resolved": "https://registry.npmjs.org/express/-/express-4.13.3.tgz",
"dependencies": {
"accepts": {
"version": "1.2.13",
"from": "https://registry.npmjs.org/accepts/-/accepts-1.2.13.tgz",
@nicolaballotta
nicolaballotta / kubecontext.zsh
Last active February 14, 2023 23:46
Add Kubernetes context to your zsh prompt (for Agnoster theme, but can easily be adapted to different themes)
# INSTALLATION
# - Add the following function to your .oh-my-zsh/themes/agnoster.zsh-theme
# - Call prompt_kubecontext from build_prompt() as showed in the example below
#
#
# build_prompt() {
# prompt_kubecontext
# }