Skip to content

Instantly share code, notes, and snippets.

View AshConnolly's full-sized avatar
🚀

Ash Connolly AshConnolly

🚀
View GitHub Profile
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://chat.openai.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=openai.com
// @grant none
// ==/UserScript==
@AshConnolly
AshConnolly / main.rs
Created December 13, 2022 14:48 — forked from rikschennink/main.rs
Tauri MacOS tray app
#![cfg_attr(
all(not(debug_assertions), target_os = "windows"),
windows_subsystem = "windows"
)]
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
#[tauri::command]
fn sync(name: &str) -> String {
format!("Hello, {}! You've been greeted from Rust!", name)
@AshConnolly
AshConnolly / git amend & and git push force.sh
Last active August 8, 2020 10:33
Updated my #git amend & push force! Add them to your "~/.bash_profile" & use with care! 😃
# git add commit amend // usage: "gaca"
function gaca() {
# Add all files & changes to your most recent local commit
git add .
git commit --amend --no-edit
}
# To push this amended change into your most recent * remote * commit use the next function (after using gaca) 🚨 WITH EXTREME CAUTION! 🚨 If you git push force to wrong remote branch you will overwrite its entire branch history with a different branch! If possible always choose to add another commit instead!
@AshConnolly
AshConnolly / emotion-theming.js
Created June 21, 2020 11:23
Emotion CSS Theming reference
import { Global, css } from '@emotion/core'
import styled from '@emotion/styled'
import { ThemeProvider, useTheme } from 'emotion-theming'
import { reset } from '~/src/global-styles/reset'
const Headline = styled.h1`
color: ${props => props.theme.color};
font-size: 28px;
`
@AshConnolly
AshConnolly / openfoldersincode
Created April 30, 2020 19:11
For loop to open all subdirectories of current directory in vscode
# For loop to open all subdirectories in vscode
function openfoldersincode() {
declare -a dirs
i=1
for d in */
do
dirs[i++]="${d%/}"
done
echo "There are ${#dirs[@]} dirs in the current path."
for((i=1;i<=${#dirs[@]};i++))
.hero {
width: 100%;
height: 400px;
position: relative;
.callout {
padding: 2rem;
.title { font-size: 3rem; }
}
(function() {
window.addEventListener('keydown', function(e) {
var player = document.querySelector('video')
// console.log("TCL: vimeoControls -> e", e)
if (e.keyCode === 37) {
player.currentTime -= 5
}
if (e.keyCode === 39) {
player.currentTime += 5
}