This is an example for a personal MacbookAir, to connect github.com.
ssh-keygen -t rsa -f ~/.ssh/id_rsa,github.com -C "github,macbookair_perso"
chmod 600 ~/.ssh/id_rsa,github.com
alias can-haz="sudo apt-get install" | |
# Autocomplete function | |
_can-haz() { | |
cur=`_get_cword` | |
COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) ) | |
return 0 | |
} | |
complete -F _can-haz can-haz |
type BatchLoadFn<K, V> = (keys: Array<K>) => Promise<Array<V | Error>>; | |
type LoadAllFn<K, V> = () => Promise<Array<[K, V]>>; | |
type Options<K, V> = { | |
batch?: boolean, | |
cache?: boolean, | |
cacheMap?: CacheMap<K, Promise<V>>, | |
cacheKeyFn?: (key: any) => any | |
}; |
import java.util.logging.Logger; | |
import javax.inject.Inject; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.Path; | |
import javax.ws.rs.core.Response; | |
import org.glassfish.hk2.utilities.binding.AbstractBinder; | |
import org.glassfish.jersey.filter.LoggingFilter; | |
import org.glassfish.jersey.process.internal.RequestScoped; | |
import org.glassfish.jersey.server.ResourceConfig; | |
import org.glassfish.jersey.test.JerseyTest; |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import sun.security.tools.keytool.CertAndKeyGen; | |
import sun.security.x509.X500Name; | |
import java.io.IOException; | |
import java.security.InvalidKeyException; | |
import java.security.KeyStore; | |
import java.security.KeyStoreException; | |
import java.security.NoSuchAlgorithmException; |
// List all fonts on iPhone | |
NSArray *familyNames = [[NSArray alloc] initWithArray:[UIFont familyNames]]; | |
for (NSString *family in familyNames) { | |
NSLog(@"Family name: %@", family); | |
fontNames = [UIFont fontNamesForFamilyName: family]; | |
for (NSString *font in fontNames) { | |
NSLog(@" Font name: %@", font); | |
} |
Technical details for https://stackoverflow.com/a/44169445/6730571
On a base system, /usr/bin/java
is a symlink that points to /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
, which is an Apple wrapper tool that locates and executes the actual java
.
(Do not touch anything in those 2 system directories. It should actually be impossible due to "System Integrity Protection" anyway.)
If you don't have Java installed, attempting to execute java
will open a dialog that invites you to install it.
... | |
/* Tested with Gradle 6.3 */ | |
tasks.register("depsize") { | |
description = 'Prints dependencies for "default" configuration' | |
doLast() { | |
listConfigurationDependencies(configurations.default) | |
} | |
} |
import javax.validation.Constraint; | |
import javax.validation.Payload; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.Target; | |
import static java.lang.annotation.ElementType.FIELD; | |
import static java.lang.annotation.ElementType.PARAMETER; | |
import static java.lang.annotation.RetentionPolicy.RUNTIME; | |
/** |
We dropped Lerna from our monorepo architecture in PouchDB 6.0.0. I got a question about this from @reconbot, so I thought I'd explain our reasoning.
First off, I don't want this post to be read as "Lerna sucks, don't use Lerna." We started out using Lerna, but eventually outgrew it because we wrote our own custom thing. Lerna is still a great idea if you're getting started with monorepos (monorepi?).
Backstory: