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 { Cookie, Store, fromJSON } from 'tough-cookie'; | |
import { readFileSync, writeFileSync } from 'fs'; | |
export class Hoge extends Store { | |
private cookies: Cookie[] = []; | |
constructor(private file: string) { | |
super(); | |
const cookies: any[] = JSON.parse(readFileSync(this.file).toString()); | |
this.cookies = cookies.map(e => { | |
return fromJSON(JSON.stringify(e)); |
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
sudo yum install docker -y | |
sudo service docker restart | |
sudo docker run --rm -it --cpus=0.5 dbgso/waste-cpu |
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 python | |
RUN apt update; apt install -y wget build-essential | |
WORKDIR /tmp | |
RUN wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz --no-check-certificate | |
RUN tar -zxvf ta-lib-0.4.0-src.tar.gz | |
RUN cd ta-lib && ./configure --prefix=/usr &&\ | |
make && make install &&\ | |
cd .. && rm -rf ta-lib* |
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 axios, { AxiosAdapter, AxiosResponse } from "axios"; | |
import { createHash } from "crypto"; | |
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs"; | |
function str2Sha512(data: string) { | |
const hash = createHash('sha512') | |
hash.update(data) | |
return hash.digest('hex'); | |
} |
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
{ | |
"100": "💯", | |
"1234": "🔢", | |
"hash": "#️⃣", | |
"keycap_star": "*️⃣", | |
"zero": "0️⃣", | |
"one": "1️⃣", | |
"two": "2️⃣", | |
"three": "3️⃣", | |
"four": "4️⃣", |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
<style> | |
#header { |
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
# Error starting daemon: Devices cgroup isn't mounted | |
sudo cgroupfs-mount |
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
# run with sudo | |
apt update | |
apt upgrade | |
apt install npm curl | |
npm install -g n | |
n stable | |
node --version |
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
# coding: utf-8 | |
from sqlalchemy.engine import Engine | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy import Column, Integer, String, DateTime, create_engine, ForeignKey | |
from datetime import datetime | |
import sqlalchemy.orm as orm | |
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
@RunWith(SpringRunner.class) | |
@SpringBootTest | |
public class TerminalTest { | |
} |
NewerOlder