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 iTunesPlayerSegment(PlayerSegment): | |
| def get_player_status(self, pl): | |
| status_delimiter = '-~`/=' | |
| ascript = ''' | |
| tell application "System Events" | |
| set process_list to (name of every process) | |
| end tell | |
| if process_list contains "iTunes" then | |
| tell application "iTunes" |
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
| var quotes = new Array; | |
| quotes.push("Avuncular at best in a church of new things<br>He traded the records for rings<br>As I sat back and watched what I thought would ensue not ensue"); | |
| quotes.push("If you don't believe in recompense, who will fix the fence for you?"); | |
| quotes.push("What is it about music that lends itself so well to business as fucking usual?"); | |
| quotes.push("I am a tastemaker, and I kill things<br>I am not a tastemaker and I kill things"); | |
| quotes.push("Jennifer, your halter top: a consecrated altar<br>But I've wrung my hands and knees in shame there one too many times"); | |
| quotes.push("Girls are great<br>Grated on my plate<br>And boys are best<br>Served with a stake through the chest"); | |
| quotes.push("There are no wills, there are no keys<br>Only executors and executees"); | |
| quotes.push("One might say we've lost the space race<br>Another one might say we've won"); | |
| quotes.push("The pedagogue in me asked "What have you read lately?"<br>A pleasantry the blonde in you responded to"); |
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
| #include <stdio.h> | |
| #ifdef __APPLE__ | |
| /* /System/Library/Frameworks/GSS.framework/GSS should be statically linked */ | |
| #include <GSS/GSS.h> | |
| #else | |
| #include <gssapi/gssapi.h> | |
| #include <gssapi/gssapi_krb5.h> | |
| #endif | |
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
| # Public: A fancy class for doing complicated group-bys. | |
| # Construct it with a strategy object that responds to #key_for, #set, and | |
| # #default_accumulator. | |
| class Aggregator | |
| attr_reader :strategy | |
| # Public: Create a new Aggregator. | |
| # | |
| # strategy - An aggregation strategy object that responds to the following: | |
| # #key_for(item) - takes an item from the collection and returns the key to use for it. |
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
| describe 'test' do | |
| it 'locks stuff' do | |
| ActiveRecord::Base.connection.execute <<-SQL | |
| BEGIN; | |
| SELECT pg_advisory_lock(420); | |
| SQL | |
| Thread.new do | |
| res = ActiveRecord::Base.connection.execute <<-SQL | |
| SELECT pg_try_advisory_lock(420); |
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
| require 'forwardable' | |
| class RecordRelation | |
| extend Forwardable | |
| include Enumerable | |
| attr_reader :records | |
| def_delegators :@records, :each | |
| def initialize(records_array) |
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
| try | |
| if !empty($LIGHT_MODE) | |
| set background=light | |
| colorscheme PaperColor | |
| let g:airline_theme='papercolor' | |
| else | |
| set background=dark | |
| colorscheme jellybeans | |
| let g:airline_theme = 'jellybeans' | |
| endif |
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
| { | |
| "items": [ | |
| { | |
| "id": "fal-ai/imagen4/preview", | |
| "modelId": "d10e9u7qn7dbfsbcf8bg", | |
| "isFavorited": true, | |
| "title": "Imagen 4", | |
| "category": "text-to-image", | |
| "tags": [], | |
| "shortDescription": "Google’s highest quality image generation model", |
OlderNewer