List of helpful shortcuts for faster coding
If you have any other helpful shortcuts, feel free to add in the comments of this gist :)
name: Security audit | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
push: | |
paths: | |
- '**/Cargo.toml' | |
- '**/Cargo.lock' | |
jobs: | |
security_audit: |
# Run with elevated privileges | |
# If you have Connect Wise Control installed, remove it. IT organizations are likely to install it (or similar tool) if they feel the need for Netskope clients. | |
# RE: https://saputra.org/threads/remove-screenconnect-or-connectwise-control-from-windows-mac-linux.45/ | |
function remove_cswincom() { | |
thumbprint=$(ls /Library/LaunchAgents/connectwisecontrol-* | head -1 | awk -F- '{print $2}') | |
# Stop the ConnectWiseControl Client service | |
launchctl unload /Library/LaunchAgents/connectwisecontrol-${thumbprint}-onlogin.plist | |
# Delete the service definitions | |
rm -f /Library/LaunchAgents/connectwisecontrol-${thumbprint}-*.plist |
#include <SPIFFS.h> | |
/* | |
* | |
* Copyright (C) 2017 CS.NOL https://github.com/csnol/1CHIP-Programmers | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, | |
* and You have to keep below webserver code |
env: | |
TERM: xterm-256color | |
window: | |
dimensions: | |
columns: 80 | |
lines: 24 | |
padding: | |
x: 2 |
import { useState } from 'react'; | |
export function useCounter(initial = 0) { | |
const [count, setCount] = useState(initial); | |
return [count, () => setCount(count + 1)]; | |
} |
import { FieldProps } from 'formik' | |
import React from 'react' | |
import Select, { Option, ReactSelectProps } from 'react-select' | |
export const SelectField: React.SFC<ReactSelectProps & FieldProps> = ({ | |
options, | |
field, | |
form, | |
}) => ( | |
<Select |
#!/bin/bash | |
for d in ./*/; | |
do ( | |
cd "$d" && | |
currentDir=`pwd` | |
echo "updating `basename "$currentDir"`..." | |
git pull | |
); | |
done |
#Headless Setup of Raspberry Pi Zero W (Raspberry Pi 3 Wireless) (macOS)
diskutil eraseDisk ExFat temp disk4(Use your disk here)
wget https://downloads.raspberrypi.org/raspbian_lite_latest
diskutil unmountDisk /dev/disk4
or whatever your disk path issudo dd if=PATH-TO-RASPBIAN-IMAGE
of=/dev/disk4` or whatever your disk path iscd /volumes && ls
. You should see a boot partition from the SD card cd boot && touch ssh
nano wpa_supplicant.conf
and enter network={ ssid="YOUR-SSID" psk="YOUR-WIFI-PASSWORD" }
diskutil unmountDisk /dev/disk4
(or whatever your disk path is) and put it in the