name: code-sanity-checker description: "Use this agent when you need to verify that recently written code is logically sound, efficient, and well-structured before it undergoes formal code review. This agent should be called after a logical chunk of code has been written (a completed feature, a refactored module, or a significant implementation) to catch architectural and logical issues early.\n\nExamples of when to use this agent:\n\n\nContext: The user has just finished implementing a new feature for player ratings in the Witchcraft game.\nuser: "I've implemented the player rating system. Here's the code:"\nassistant: "I'm going to use the Task tool to launch the code-sanity-checker agent to review the logic and structure of this implementation."\n\nSince a significant feature implementation was completed, use the code-sanity-checker agent to verify the logic is sound and the code is well-structured before formal review.\n\n\n\n\nCon
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
| javascript:setTimeout(function(){ | |
| var m = window.location.href.match(/trello.com\/c\/[A-z\d]+\/(\d+)/); | |
| if(m){ | |
| var text = new Date().toLocaleDateString("en-US") + "\t" + | |
| '=HYPERLINK("'+m[0]+'","'+m[1]+'")' + "\t" + | |
| document.querySelector('div.window-title>textarea').value; | |
| navigator.clipboard.writeText(text); | |
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
| [Ll]ibrary/ | |
| [Tt]emp/ | |
| [Oo]bj/ | |
| [Bb]uild/ | |
| [Bb]uilds/ | |
| Assets/AssetStoreTools* | |
| # Visual Studio cache directory | |
| .vs/ |
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
| Should be added to /etc/network/if-pre-up.d/iptable_rules | |
| Don't forget to run | |
| chmod +x /etc/network/if-pre-up.d/iptable_rules |
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
| class Object | |
| def self.my_decorator(method_name) | |
| alias_method "#{method_name}_without_my_decorator", method_name | |
| define_method method_name do | |
| puts "My decorator logic starts" | |
| result = send("#{method_name}_without_my_decorator") | |
| puts "My decorator logic ends" | |
| result | |
| end |
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
| #!/usr/bin/env ruby | |
| def process_folders(message, *folders, &block) | |
| root = File.expand_path('../..', __FILE__) | |
| puts message | |
| puts | |
| total_old = 0 | |
| total_new = 0 |
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
| ffmpeg -i input.mkv -map 0:0 -map 0:2 -c:v copy -c:a:0 copy output.mp4 |
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
| CLAN_ID = 1 | |
| clan = Clan.find(CLAN_ID) | |
| character_ids = ClanMember.connection.select_values( | |
| ClanMember.send(:sanitize_sql, ["SELECT character_id FROM clan_members WHERE clan_id = :clan", :clan => clan.id]) | |
| ) | |
| position = 0 |
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
| def backup(path, redis) | |
| keys = redis.keys | |
| puts "#{ keys.size } keys to dump" | |
| File.open(path, 'w+') do |f| | |
| keys.each_with_index do |key, i| | |
| next unless dump = redis.dump(key) | |
| f.puts JSON.dump([key, dump.force_encoding('utf-8')]).force_encoding('utf-8') |
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
| [mysql] | |
| # CLIENT # | |
| port = 3306 | |
| socket = /var/lib/mysql/mysql.sock | |
| [mysqld] | |
| # GENERAL # | |
| user = mysql |
NewerOlder