Help with SQL commands to interact with a MySQL database
- Mac /usr/local/mysql/bin
- Windows /Program Files/MySQL/MySQL version/bin
- Xampp /xampp/mysql/bin
| #!/usr/bin/osascript | |
| # Required parameters: | |
| # @raycast.schemaVersion 1 | |
| # @raycast.title All to main | |
| # @raycast.mode compact | |
| # Optional parameters: | |
| # @raycast.icon �ü§ñ |
| const extractFromObj = <T, K extends keyof T>( | |
| obj: T, | |
| keys: K[] | |
| ): Pick<T, K> => { | |
| return keys.reduce((newObj, curr) => { | |
| newObj[curr] = obj[curr]; | |
| return newObj; | |
| }, {} as Pick<T, K>); | |
| }; |
| def sup(conn, _params) do | |
| conn = conn | |
| |> put_resp_header("content-type", "audio/mp3") | |
| |> send_chunked(200) | |
| File.stream!("priv/static/assets/sample4.mp3", [], @chunk_size) | |
| |> Enum.into(conn) | |
| end | |
| # https://stackoverflow.com/questions/37544655/elixir-stream-audio-to-users |
| /** | |
| * 3 simple details | |
| * | |
| * 1. wraping it in a module to not leak variables to the global scope. | |
| * 2. using reduce, map or forEach instead of for in loops | |
| * 3. right away checking if the cart is accesible o stopping and throwing an error | |
| */ | |
| // Wrapping it in a module to keep global scope clean | |
| let challengeModule = (() => { |
| .skeleton { | |
| --text-opacity: 0; | |
| background-image: linear-gradient(100deg, #edf2f7 0%, #f4f7fa 20%, #edf2f7 40%); | |
| background-position: 50%; | |
| background-size: 200%; | |
| animation: skeleton 1.25s infinite linear; | |
| } | |
| .skeleton-teal { | |
| background-image: linear-gradient(100deg, #b4c5f8 0%, #cad8f9 20%, #b4c5f8 40%); |
| --- | |
| deployment: | |
| tasks: | |
| - export DEPLOYPATH=/home/cpanel_account_name/sub.domain.com/ | |
| - /bin/cp -r * $DEPLOYPATH | |
| version: '3' | |
| services: | |
| #Database | |
| db: | |
| image: mysql:5.7 | |
| volumes: | |
| - db_data:/var/lib/mysql | |
| restart: always | |
| environment: |
| add_filter( 'woocommerce_loop_add_to_cart_link', 'replacing_add_to_cart_button', 10, 2 ); | |
| function replacing_add_to_cart_button( $button, $product ) { | |
| $button_text = __("View Product", "woocommerce"); | |
| $button = '<a class="button" href="' . $product->get_permalink() . '">' . $button_text . '</a>'; | |
| return $button; | |
| } |
| <?php | |
| class SessionManager { | |
| public static function sessionStart($name, $limit = 0, $path = '/', $domain = null, $secure = null){ | |
| // Set the cookie name | |
| session_name($name . '_Session'); | |
| // Set SSL level | |
| $https = isset($secure) ? $secure : isset($_SERVER['HTTPS']); |