This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws s3api list-objects --bucket [BUCKET NAME] --output json --query 'Contents[].{Key: Key, Size: Size}' > objects_with_size.json | |
cat objects_with_size.json | jq -r '.[] | [.Key,.Size] | @csv' > objects_with_size.csv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -name "*sync-conflict*" -print -exec rm -rf {} \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo Updating apt | |
sudo apt update | |
sudo apt upgrade -y | |
echo Installing Docksal | |
bash <(curl -fsSL https://get.docksal.io) | |
echo "DOCKSAL_VHOST_PROXY_IP=0.0.0.0" >> ~/.docksal/docksal.env |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Replace 23 with the line number your looking for | |
for file in $(grep -r -I -l .); do | |
awk 'FNR==23 {print FILENAME, $0}' "$file" >> ./output.txt; | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Threading.Tasks; | |
using HomeAssistant.AppStarter; | |
using HomeAssistant.AppStarter.Models.Events; | |
using HomeAssistant.AppStarter.WebServices; | |
using NLog; | |
namespace HassLab.Console.HassApps | |
{ | |
public class WakeUpApp : IHassApp | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find ./ -name "*.ext" -exec grep -iH "search terms" {} \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This lets you track an individual using Google Latitude depending on the hour of the day, days in a week and months. | |
* | |
* How to get your Google ID | |
* ========================= | |
* Go to : https://latitude.google.com/latitude/b/0/apps | |
* Click "Enable and show best available location" and Save | |
* In the text area, copy the ID from the URL, for example: | |
* http://latitude.google.com/latitude/apps/badge/api?user=<GOOGLE ID>&type=iframe&maptype=roadmap&hl=en-GB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SERVER=$1 | |
NFS_SHARE=$2 | |
LOCAL_SHARE=$3 | |
RAMFS_SHARE=$4 | |
echo "Setting up RamFS" | |
mkdir /tmp/ramfs | |
mkdir /tmp/ramfs/$RAMFS_SHARE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM ==== Windows XP ==== | |
cd "C:\Documents and Settings\User\Desktop" | |
mkdir "C:\Documents and Settings\User\My Documents\Desktop" | |
for /r %%x in (.,^) do move /Y "%%x" "C:\Documents and Settings\User\My Documents\Desktop" | |
REM ==== Windows Vista, 7, + ==== | |
cd "C:\Users\User\Desktop" | |
mkdir "C:\Users\User\Documents\Desktop" | |
for /r %%x in (.,^) do move /Y "%%x" "C:\Users\User\Documents\Desktop" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
####################################################### | |
# UNIX TREE # | |
# Version: 2.3 # | |
# File: ~/apps/tree/tree.sh # | |
# # | |
# Displays Structure of Directory Hierarchy # | |
# ------------------------------------------------- # | |
# This tiny script uses "ls", "grep", and "sed" # | |
# in a single command to show the nesting of # |
NewerOlder