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 { | |
Stack, | |
StackProps, | |
RemovalPolicy, | |
aws_rds as rds, | |
aws_ec2 as ec2, | |
custom_resources as cr, | |
CfnResource, | |
} from 'aws-cdk-lib' | |
import { Construct } from 'constructs' |
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
// @flow | |
import PostHTML from 'posthtml' | |
import type {PostHTMLNode} from 'posthtml' | |
import HTMLTransformer from '@parcel/transformer-html' | |
import type { | |
MutableAsset, | |
TransformerResult, | |
Transformer as TransformerOpts, | |
} from '@parcel/types' |
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
REM Hits ⌘+Space then Ctrl+Space then 英数 button (HID 145) | |
REM Guarantees Spotlight open and English keyboard | |
REM Must use Ducky encoder with HID command support | |
REM https://github.com/mame82/USB-Rubber-Ducky/tree/USB-HID-keycode | |
DELAY 1000 | |
GUI SPACE | |
CTRL SPACE | |
HID 145 | |
STRING terminal | |
DELAY 500 |
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
# -*- coding: utf-8 -*- | |
from random import SystemRandom | |
import sys | |
chars = list(u"ぁあぃいぅうぇえぉおかがきぎくぐけげこごさざしじすずせぜそぞただちぢっつづてでとどなにぬねのはばぱひびぴふぶぷへべぺほぼぽまみむめもゃやゅゆょよらりるれろゎわゐゑをんぁあぃいぅうぇえぉおかがきぎくぐけげこごさざしじすずせぜそぞただちぢっつづてでとどなにぬねのはばぱひびぴふぶぷへべぺほぼぽまみむめもゃやゅゆょよらりるれろゎわゐゑをんぁあぃいぅうぇえぉおかがきぎくぐけげこごさざしじすずせぜそぞただちぢっつづてでとどなにぬねのはばぱひびぴふぶぷへべぺほぼぽまみむめもゃやゅゆょよらりるれろゎわゐゑをん") | |
length = int(sys.argv[1]) | |
vocab = len(chars) | |
cryptogen = SystemRandom() |
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
include Opscode::Aws::Elb | |
action :register do | |
converge_by("add the node to ELB #{new_resource.elb_name}") do | |
target_lb = elb.describe_load_balancers[:load_balancer_descriptions].find { |lb| lb[:load_balancer_name] == new_resource.elb_name } | |
unless target_lb[:instances].detect { |instances| instances.include?(instance_id) } | |
Chef::Log.info("Adding node to ELB #{new_resource.elb_name}") | |
elb.register_instances_with_load_balancer(load_balancer_name: new_resource.elb_name, instances: [{ instance_id: instance_id }]) | |
else | |
Chef::Log.debug("Node #{instance_id} is already present in ELB instances, no action required.") |
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
commands: | |
00_download_jdk7: | |
command: wget --no-cookies --no-check-certificate --header "Cookie:gpw_e24=xxx;oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.rpm" -O /etc/tomcat7/jdk7-oracle.rpm | |
test: test ! -f /etc/tomcat7/oracle-jdk7-installed.txt | |
01_install_oracle_jdk7: | |
command: yum -y install jdk7-oracle.rpm | |
cwd: /etc/tomcat7 | |
test: test ! -f /etc/tomcat7/oracle-jdk7-installed.txt && md5sum -c - <<<"b516630a940d83b066cf1e6479ec59fe jdk7-oracle.rpm" |
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 feature 'say'; | |
my $NUMCARDS = $ARGV[0]*2; | |
die "Usage: perl bruteforce.pl [NUMBER OF CARDS]\n" unless $ARGV[0]; | |
say "num cards: $NUMCARDS"; | |
my @init = split'','.'x$NUMCARDS; | |
&iterate_desc($NUMCARDS/2,@init); |
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 strict; | |
use warnings; | |
use 5.10.00; | |
my $regexp = qr/ | |
^( | |
(?: | |
[a-z :]|:\(|:\)|\((?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
use strict; | |
use warnings; | |
use 5.10.00; | |
<>; | |
my $case; | |
for(<>){ | |
$case++; | |
chomp; | |
my(%c,$answer); |
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
CREATE OR REPLACE FUNCTION new_peer(n character varying, r bigint, c bigint, tp integer, lp integer) | |
RETURNS bigint AS | |
$BODY$ | |
DECLARE peerid bigint; | |
BEGIN | |
LOOP | |
-- first try to update the key | |
UPDATE peers INTO peerid SET lastpage=lp WHERE "name" = n returning id; | |
IF found THEN | |
-- SELECT id into peerid from peers where "name"=n; |