Skip to content

Instantly share code, notes, and snippets.

View akodkod's full-sized avatar
🇺🇦
#StopRussia #StopWar

Andrew Kodkod akodkod

🇺🇦
#StopRussia #StopWar
View GitHub Profile
directory() {
echo "%{$fg[cyan]%}%1~%{$reset_color%}"
}
current_time() {
echo "%{$fg[white]%}[%*]%{$reset_color%}"
}
git_prompt() {
echo "$(git_prompt_info)"
@akodkod
akodkod / likes.tsx
Created September 15, 2023 19:08
Manage likes using Zustand
import { captureException } from "@sentry/nextjs"
import toast from "react-hot-toast"
import { create } from "zustand"
import likePhoto from "@/actions/likePhoto"
import { ServerAction } from "@/actions/withServerAction"
import SignInModal from "@/components/auth/SignInModal"
import { getBaseErrorMessage } from "@/lib/helpers/error"
import { currentUser } from "@/stores/currentUser"
import { openModal } from "@/stores/modal"
<script setup lang="ts">
import { LifebuoyIcon } from "@heroicons/vue/24/outline"
import { FunctionalComponent } from "vue"
import type { IconName } from "~/components/Icon.vue"
const props = withDefaults(defineProps<{
type?: "button" | "submit" | "reset"
variant?: "primary" | "secondary" | "tertiary"
size?: "sm" | "md" | "lg"
icon?: IconName | FunctionalComponent
@akodkod
akodkod / Gemfile
Created August 18, 2015 11:10
Ruby on Rails 4 - Useful gems
gem 'request_store'
gem 'foreman'
gem 'rubocop'
gem 'bullet'
gem 'quiet_assets'
gem 'better_errors'
gem 'binding_of_caller'
gem 'awesome_print'
gem 'lograge'
gem 'figaro'
'use strict';
timeout = null;
angular.module 'wearedoge'
.config [
'$stateProvider', '$urlRouterProvider',
($stateProvider, $urlRouterProvider) ->
$stateProvider
@akodkod
akodkod / Gemfile.rb
Last active December 18, 2015 12:10
Rails Gems for Developing
group :development
gem 'better_errors' # better errors pages (https://github.com/charliesome/better_errors)
gem 'binding_of_caller' # console for better errors
gem 'jazz_hands' # cool rails console `rails c` (https://github.com/nixme/jazz_hands)
gem 'quiet_assets' # speed up assets & clear log (https://github.com/evrone/quiet_assets)
gem 'bullet' # optimize queries (https://github.com/flyerhzm/bullet)
end
<% flash.each do |type, message| %>
<div class="alert <%= bootstrap_class_for(type) %> fade in">
<button class="close" data-dismiss="alert">×</button>
<%= message %>
</div>
<% end %>
@akodkod
akodkod / gist:6366589
Created August 28, 2013 14:25
fix .gitignore
git rm -r --cached .
git add .
git commit -m "fix .gitignore"