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
| <?php | |
| $list = " | |
| Afghanistan | |
| Albania | |
| Algeria | |
| Andorra | |
| Angola | |
| Antigua and Barbuda | |
| Argentina | |
| Armenia |
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
| #!/bin/bash | |
| # PHP 7.0.2 | |
| # Pthreads 3.1.5 | |
| curl -LsS https://symfony.com/installer -o ./symfony | |
| chmod a+x ./symfony | |
| ./symfony new segfault_proof 2.8.2 | |
| cd segfault_proof/ | |
| mkdir src/AppBundle/Command |
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
| <?php | |
| use Monolog\Handler\StreamHandler; | |
| use Monolog\Logger; | |
| require 'vendor/autoload.php'; | |
| class MyThread extends Thread | |
| { | |
| public function run() |
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
| import React from 'react'; | |
| import {StyleSheet, Text, View, ScrollView, SafeAreaView} from 'react-native'; | |
| import {LinearGradient} from "expo"; | |
| export default class App extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { |
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
| @EnableWebSecurity | |
| @EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true) | |
| @Import(SecurityProblemSupport.class) | |
| public class SecurityConfiguration extends WebSecurityConfigurerAdapter { | |
| @Value("${spring.security.oauth2.client.provider.oidc.issuer-uri}") | |
| private String issuerUri; | |
| private final JwtAuthorityExtractor jwtAuthorityExtractor; | |
| private final SecurityProblemSupport problemSupport; |
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
| const { | |
| BaseTransaction, | |
| TransactionError, | |
| utils, | |
| } = require('@liskhq/lisk-transactions'); | |
| const _ = require('lodash'); | |
| /** | |
| * type asset { |
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
| FROM node:12.15.0-alpine as build | |
| WORKDIR /app | |
| ENV PATH /app/node_modules/.bin:$PATH | |
| RUN apk --no-cache upgrade && apk --no-cache add alpine-sdk python2 libtool autoconf automake git | |
| COPY . ./ | |
| RUN npm ci | |
| ENV NODE_ENV production |
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
| declare function get<Doc, Key extends keyof Doc = infer>(); | |
| declare let unknownObj: unknown; | |
| declare let obj: { title: string; description: string }; | |
| // CASE 0 | |
| const case0 = get(obj, 'description'); | |
| // Unchanged: string | |
| // CASE 1 | |
| const case1 = get<{ title: string; description: string }>(unknownObj, 'description'); |
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
| import { vi } from 'vitest'; | |
| type Vi = typeof vi; | |
| export class LocalStorage { | |
| store!: Record<string, string>; | |
| constructor(vi: Vi) { | |
| Object.defineProperty(this, 'store', { | |
| enumerable: false, |