jq is useful to slice, filter, map and transform structured json data.
brew install jq
#!/usr/bin/env bash | |
export search_cluster="https://search-offcourse-search-development-dtoc6zcl2sm3kwxidih7v4nloi.us-east-1.es.amazonaws.com" | |
export assets_bucket="offcourse-assets-development" | |
export raw_resources_bucket="offcourse-raw-resources-development" | |
export temp_bucket="offcourse-temp-development" | |
export resources_bucket="offcourse-resources-development" | |
export bookmarks_bucket="offcourse-bookmarks-development" | |
export raw_users_bucket="offcourse-raw-users-development" |
#!/bin/sh | |
# Copyright (C) 2009-2017 Three Nine Consulting | |
# Always good practice to update packages. However ask user if they would like to do so | |
# For explanation on how this works and why check out https://garywoodfine.com/use-pbcopy-on-ubuntu/ | |
read -p "Do you want to update your package repositories before proceeding ? " -n 1 -r | |
echo #adding new line | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y | |
fi |
// This is an example how to put an arduino board into deep sleep to save on battery power and | |
// periodically wake up to run some logic. Ideal for sensor stations like plant moisture sensors. | |
#include "Arduino.h" | |
#include <avr/sleep.h> | |
#include <avr/power.h> | |
#include <avr/wdt.h> | |
// Blink Before sleeping | |
#define LED_PIN (13) |
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <sys/mman.h> | |
#include <string.h> | |
#define LRADC 0x01C22800 | |
#define CTRL_OFFSET 0x00 |
(ns some-project.core | |
(:require-macros [cljs.core.async.macros :refer [go]]) | |
(:require [cljs.nodejs :as nodejs] | |
[cljs.core.async :as a :refer [put! <! chan alts! timeout]])) | |
(nodejs/enable-util-print!) | |
(def -main (fn [] nil)) | |
(set! *main-cli-fn* -main) | |
(def spawn (.-spawn (js/require "child_process"))) |
class Foo | |
def foo | |
puts "I am foo!" | |
end | |
def do_foo | |
# all five are equivalent | |
foo | |
self.foo | |
foo() |
The purpose of this document is to make recommendations on how to browse in a privacy and security conscious manner. This information is compiled from a number of sources, which are referenced throughout the document, as well as my own experiences with the described technologies.
I welcome contributions and comments on the information contained. Please see the How to Contribute section for information on contributing your own knowledge.
#!/bin/bash | |
cat $(find app/assets/stylesheets/ -type f) | | |
grep -Eo '\.[a-z]+[a-z0-9_-]*' | sort | uniq | sed s/.// | | |
while read CSS; do | |
if ! grep -Erqi "([^(remove|has)]?class[(:|=|[:space:]*=>[:space:]*)]*[[:space:]\W]*[(\"|')]*[-a-z0-9[:space:]]*$CSS|\\.$CSS\b)" app/views/ vendor/assets/ app/assets/javascripts/; then | |
echo $CSS >> unused.scss; | |
fi | |
done |