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
extern crate nom; | |
use nom::{ | |
branch::alt, | |
bytes::complete::tag, | |
character::complete::{char, multispace0}, | |
combinator::{map, recognize}, | |
multi::separated_list1, | |
sequence::delimited, | |
IResult, |
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
use fork::{fork, Fork}; | |
use std::{process, thread}; | |
use std::thread::sleep; | |
use anyhow::{anyhow, Error}; | |
use ipc_channel::ipc::{IpcReceiver, IpcSelectionResult}; | |
use ipc_channel::ipc::{self, IpcReceiverSet, IpcSender}; | |
use serde::{Deserialize, Serialize}; | |
use rand::Rng; | |
const MAX_PRIORITY: i8 = 127; |
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
use libpep::*; | |
use libpep::simple::*; | |
use rand_core::OsRng; | |
use std::{fmt::Write, num::ParseIntError}; | |
use std::cell::RefCell; | |
use std::collections::HashMap; | |
use std::ops::Mul; | |
use std::rc::Rc; | |
pub fn decode_hex(s: &str) -> Result<Vec<u8>, ParseIntError> { |
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
[Stylesheet (5)] | |
[AtRule] name: media | |
[MediaQueryList (2)] | |
[MediaQuery] modifier: only media_type: screen | |
[Condition (1)] | |
[Feature] kind: Media name: -webkit-min-device-pixel-ratio | |
[Number] 1.25 | |
[MediaQuery] modifier: only media_type: screen | |
[Condition (1)] | |
[Feature] kind: Media name: min-resolution |
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
<?php | |
namespace App\Form; | |
use Symfony\Component\Form\Extension\Core\Type\ChoiceType; | |
use Symfony\Component\Form\FormInterface; | |
use Symfony\Component\Form\FormView; | |
use Symfony\Component\OptionsResolver\OptionsResolver; | |
class ChoiceTypeWithAttr extends ChoiceType |
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 middleware | |
func (*JWTToken) ServeHTTP(w http.ResponseWriter, r *http.Request, next http.HandlerFunc) { | |
tmp := mux.Vars(r) | |
// tmp is nil | |
// Do stuff | |
next(w, r) | |
} |
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
Compute | |
EC2 Virtual Private Servers | |
Lightsail Amazon's hosting provider (vps, dns, storage) | |
Lambda Functions you can run, written in Python, NodeJS, Go etc. Can run many in parallel. | |
Batch Run software jobs on EC2 machines | |
Elastic Beanstalk Run software on managed virtual machines | |
Serverless Application Repository Repository of serverless applications that you can deploy (on lambda) | |
AWS Outposts Basically run Amazon services on your own hardware (datacenter) | |
EC2 Image Builder Create EC2 (ami?) images automatically |
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
namespace KeyRotate; | |
use Doctrine\Common\Cache\PhpFileCache; | |
use Doctrine\DBAL\Driver\PDOMySql\Driver; | |
class PdoMysql extends Driver | |
{ | |
protected $client; | |
protected $cache; |
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
hs.hotkey.bind({"cmd", "shift"}, "1", function() | |
local app = hs.application.get("Joplin") | |
if app == nil then | |
local app = hs.application.open("Joplin") | |
app:activate(true); | |
else | |
app:activate(true); | |
end | |
end) |
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
<?php | |
namespace App\Services; | |
use Psr\Http\Message\RequestInterface; | |
use Zipkin\Propagation\RequestHeaders; | |
use Zipkin\Tracing; | |
class ZipkinGuzzleMiddleware { |
NewerOlder