/"([^\\]\\"|[^"])*?"/
Sample Data:
"ASD"
"asd\" asd"
"asd\\" "asd"
"asd"
(import "ksonnet-util/kausal.libsonnet") + | |
{ | |
local cronJob = $.batch.v1beta1.cronJob, | |
local container = $.core.v1.container, | |
hello_container:: | |
container.new("hello", "busybox") + | |
container.withCommand([ | |
"sh", | |
"-c", |
import grpc | |
import logproto_pb2 | |
import logproto_pb2_grpc | |
import google.protobuf.timestamp_pb2 | |
import time | |
print("=== loaded loki plugin ===") |
netstat -apn | grep CLOSE_WAIT | awk '{ print $7 }' | sort | uniq -c | sort -nr |
#!/bin/bash | |
dpkg -l | grep '^rc' | awk '{print $2}' | grep 'linux-image' | xargs sudo apt purge -y |
/"([^\\]\\"|[^"])*?"/
Sample Data:
"ASD"
"asd\" asd"
"asd\\" "asd"
"asd"
require 'titleize' | |
matches = [] | |
input = ARGF.read | |
puts "--------------------------------------------------------" | |
puts "--------------------------------------------------------" | |
puts "--------------------------------------------------------" |
DO $f$ | |
declare | |
read_data TEXT; | |
bad_id INT; | |
begin | |
FOR bad_id IN SELECT id FROM <TABLE_NAME> LOOP | |
begin | |
SELECT <TABLE_FIELD> | |
INTO read_data | |
FROM <TABLE_NAME> where id = bad_id; |
file_names = Dir.glob("**/*.rb") | |
file_names.each do |file_name| | |
content = File.read(file_name) | |
new_content = content.gsub(/\.dig\('([^']+)'\)/) { |function| function.gsub(/(.)\.(.)/, '\1\', \'\2' ) } | |
File.open(file_name, "w") {|file| file.puts new_content } | |
end |
scope1 = Model.scope1 | |
scope2 = Model.scope2 | |
union = Arel::Nodes::Union.new(scope1.arel, scope2.arel) | |
aliased_union = Arel::Nodes::As.new(union, Model.arel_table) | |
Model.from(aliased_union) |
CREATE OR REPLACE FUNCTION idx(anyarray, anyelement) | |
RETURNS int AS | |
$$ | |
SELECT i FROM ( | |
SELECT generate_series(array_lower($1,1),array_upper($1,1)) | |
) g(i) | |
WHERE $1[i] = $2 | |
LIMIT 1; | |
$$ LANGUAGE sql IMMUTABLE; |