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 modes.server | |
import java.security.MessageDigest | |
import javax.crypto.Cipher | |
import javax.crypto.spec.SecretKeySpec | |
object AES { | |
private val encryptCipher: Cipher | |
private val decryptCipher: Cipher |
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 requests | |
import winsound | |
def get_latest_crypto_price(): | |
response = requests.get('https://api.coinmarketcap.com/v1/ticker/bitcoin') | |
response_json = response.json() | |
return float(response_json[0]['price_usd']) | |
last_price = 100000 | |
while True: |
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
VBoxManage modifyvm "MacOS Catalina" --cpuid-set 00000001 000106e5 00100800 0098e3fd bfebfbff | |
VBoxManage setextradata "MacOS Catalina" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3" | |
VBoxManage setextradata "MacOS Catalina" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0" | |
VBoxManage setextradata "MacOS Catalina" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple" | |
VBoxManage setextradata "MacOS Catalina" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" | |
VBoxManage setextradata "MacOS Catalina" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1 |
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
ffmpeg -i input.mp4 -filter:v subtitles=subtitle.srt -c:a copy -c:v libx264 -crf 22 -preset veryfast output.mp4 |
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 java.util.ArrayList; | |
//Definition of Node | |
class Node { | |
String name; // Name of the node | |
ArrayList<Node> connectedNodes = new ArrayList<>(); // All nodes connected to this node | |
// Constructor, called when use `new Node("name")` | |
Node(String n) { | |
name = n; |
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 java.util.* | |
class TreeNode(var `val`: Int) { | |
var left: TreeNode? = null | |
var right: TreeNode? = null | |
} | |
typealias LeetNode = TreeNode | |
fun LeetNode.toNode(): Node<Int> { | |
return Node(`val`).apply { |
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
sudo find . -type d -exec chgrp webmanager {} + | |
sudo find . -type d -exec chmod g+s {} + | |
sudo find . -type d -exec setfacl -m default:group::rwx {} + |
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
.tostr : To string | |
ANY → str($expr$) |
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
#[macro_use] | |
extern crate log; | |
use rand::Rng; | |
use rand::prelude::ThreadRng; | |
use serde::Serialize; | |
use std::env; | |
use std::thread; | |
use std::time::SystemTime; | |
use reqwest::blocking::Client; |
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
/* | |
* Copyright (c) Pegasis 2019. 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. | |
* |
OlderNewer