This file contains 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
import { z } from "zod"; | |
import { drizzle, type NodePgDatabase } from "drizzle-orm/node-postgres"; | |
import { migrate } from "drizzle-orm/node-postgres/migrator"; | |
import { Client, Pool } from "pg"; | |
import { | |
Connector, | |
AuthTypes, | |
IpAddressTypes, | |
} from "@google-cloud/cloud-sql-connector"; |
This file contains 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
package com.example; | |
import io.micronaut.http.HttpRequest; | |
import io.micronaut.http.context.ServerRequestContext; | |
import io.micronaut.session.Session; | |
import io.micronaut.session.SessionStore; | |
import io.micronaut.session.http.SessionForRequest; | |
import jakarta.inject.Singleton; | |
import java.util.Optional; |
This file contains 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
const _ = require('lodash') | |
/** | |
* Async Waiting utility | |
* @param {Number} wait Number of MS to wait | |
* @return {Promise} A promise to await | |
*/ | |
const waiter = async function(wait = 0) { | |
return new Promise((resolve) => { | |
if (wait <= 0) { |
This file contains 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
// | |
// ProcessPipe.swift | |
// | |
// Created by Eldon on 8/10/18. | |
// Copyright © 2018 Big Club Digital. All rights reserved. | |
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
// | |
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
// | |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTIO |
This file contains 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
[2016-02-16 15:43:05] local.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Argument 1 passed to Illuminate\Routing\Middleware\ThrottleRequests::addHeaders() must be an instance of Illuminate\Http\Response, instance of Illuminate\Http\JsonResponse given, called in /home/vagrant/Code/MyCatsProject/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php on line 52 in /home/vagrant/Code/MyCatsProject/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php:94 | |
Stack trace: | |
#0 /home/vagrant/Code/MyCatsProject/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(52): Illuminate\Routing\Middleware\ThrottleRequests->addHeaders(Object(Illuminate\Http\JsonResponse), '60', 59) | |
#1 [internal function]: Illuminate\Routing\Middleware\ThrottleRequests->handle(Object(Illuminate\Http\Request), Object(Closure), '60', '1') | |
#2 /home/vagrant/Code/MyCatsProject/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(124): call_ |
This file contains 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
import os | |
import objc, CoreFoundation | |
from ctypes import c_void_p, pointer, cast | |
# The only reason I'm doing this the XML way is because I don't have a better way (yet) | |
# for correcting a function signature -after- it's already been imported. | |
# The problem is the last argument is a pointer to a CFArrayRef, which works out to a | |
# pointer to a pointer to a CFArray. pyobjc doesn't handle that much abstraction, so I created | |
# a custom opaque type 'CFArrayRefRef' and manually handle the conversion to/from pointer. |
This file contains 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
// | |
// NSTextField+controlTextDidPause.h | |
// | |
// Created by Eldon Ahrold on 5/23/15. | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is |
This file contains 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 python | |
import urllib | |
import subprocess, os | |
''' Set these ''' | |
user = "your_username" | |
password = "your_password" | |
server = "your.server.com" |
This file contains 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
#import <NetFS/NetFS.h> | |
///....//// | |
- (void)mount:(NSURL *)networkShare user:(NSString *)user password:(NSString *)password | |
{ | |
NSURL *mountPath = [NSURL URLWithString:@"/Volumes/"]; | |
dispatch_queue_t myQueue = dispatch_get_main_queue(); | |
AsyncRequestID requestID = NULL; |
This file contains 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/python | |
''' if you don't have the requests module installed you'll need to do that | |
with either pip or easy_install''' | |
import os,requests | |
''' Setup server and auth data. This is the name of your JSS, | |
NOT the webdav share of the JDS. The JSS actually distributes the | |
data you upload to it across the JDS shares. | |
''' |
NewerOlder