Skip to content

Instantly share code, notes, and snippets.

View pramoth's full-sized avatar

Pramoth Suwanpech pramoth

View GitHub Profile
export class AppComponent implements OnDestroy {
private _onDestroy = new Subject<void>();
constructor(@Inject(DOCUMENT) document: any) {
fromEvent(document, 'mousedown').pipe(takeUntil(this._onDestroy))
.subscribe(() => { /*...*/ }));
fromEvent(document, 'mouseup').pipe(takeUntil(this._onDestroy))
.subscribe(() => { /*...*/ }));
package th.co.geniustree.demo;
import org.junit.Test;
public class OptionalTest {
@Test
public void no_optional() {
Home home = findHomeFromSomeWhere();
//print cc. of a car in my home
if (home != null) {
<profile>
<id>prod</id>
<properties>
<spring.profiles.active>prod</spring.profiles.active>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<compilerId>javac-with-errorprone</compilerId>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
<!-- maven-compiler-plugin defaults to targeting Java 5, but our javac
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"preserveWhiteSpace": false
}
export interface QualifyOlderPerson {
id?: number;
pid?: string;
firstName?: string;
lastName?: string;
sex?: number;
birthDate?: any;
adl?: number;
groupId?: number;
createDate?: any;
<plugin>
<groupId>cz.habarta.typescript-generator</groupId>
<artifactId>typescript-generator-maven-plugin</artifactId>
<version>1.29.366</version>
<executions>
<execution>
<id>generate</id>
<goals>
<goal>generate</goal>
</goals>
@pramoth
pramoth / rfc3161.txt
Created December 29, 2017 01:59 — forked from Manouchehri/rfc3161.txt
List of free rfc3161 servers.
http://sha256timestamp.ws.symantec.com/sha256/timestamp
http://timestamp.globalsign.com/scripts/timstamp.dll
https://timestamp.geotrust.com/tsa
http://timestamp.verisign.com/scripts/timstamp.dll
http://timestamp.comodoca.com/rfc3161
http://timestamp.wosign.com
http://tsa.startssl.com/rfc3161
http://time.certum.pl
http://timestamp.digicert.com
https://freetsa.org
HTMLElement = {
type:’text’,
value:’Pramoth’,
className::’myclass’
}