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
<div class="input-group"> | |
<input [type]="fieldTextType ? 'text' : 'password'" class="form-control" | |
placeholder="Password" | |
[id]="formControlName" | |
[formControl]="control" /> | |
<div class="input-group-append"> | |
<span class="input-group-text"> | |
<i | |
class="fa" | |
[ngClass]="{ |
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
# Skip ssl verification for local opensearch service | |
class CustomerIndex | |
include SearchFlip::Index | |
# Tested on OpenSearch 1.3 and 2.5 | |
def self.connection | |
ctx = OpenSSL::SSL::SSLContext.new | |
ctx.verify_mode = OpenSSL::SSL::VERIFY_NONE | |
http_client = SearchFlip::HTTPClient.new(plugins: [ |
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
using System; | |
using System.Linq; | |
using AngleSharp.Html.Parser; | |
namespace ParsingCheck | |
{ | |
public class AngleCheck | |
{ | |
// POC for replacing inline images with separate http requests | |
// AngleSharp v0.16.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
-- Show FKeys | |
SELECT | |
tc.table_schema, | |
tc.constraint_name, | |
tc.table_name, | |
kcu.column_name, | |
ccu.table_schema AS foreign_table_schema, | |
ccu.table_name AS foreign_table_name, | |
ccu.column_name AS foreign_column_name | |
FROM |
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
<%- headers = ['Identifier', 'Service', 'Start time', 'Called Number', 'Duration (seconds)', 'price'] -%> | |
<%= CSV.generate_line headers -%> | |
<%- cdrs_collection.find_each do |record| -%> | |
<%= CSV.generate_line([record.id, record.customer_service.name, record.start, URI.decode(record.called), record.billsec, number_to_currency(record.price)]) -%> | |
<%- 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
# Ported code from https://stackoverflow.com/questions/46888656/how-to-check-password-in-node-js-from-aspnetusers-net-core | |
# ruby 2.5.1 | |
require "base64" | |
require "openssl" | |
# Value from table AspNetUsers, PasswordHash field | |
h="AQAAAAEAACcQAAAAEFzA9xEehSfcI4qgvuIPlkAXTzLrPuvVtVDW3g4+QHTR4XoIzXUikDJITOi82f4qWQ==" | |
h_bytes = Base64.decode64(h) |
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
#!/usr/bin/env ocaml | |
#load "str.cma";; | |
let concat_file_parts l = | |
String.concat "." l;; | |
let change_ext name ext = | |
let old_parts = String.split_on_char '.' name in | |
match List.rev old_parts with |
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
require 'thread' | |
log='log/development.log' | |
system "truncate --size 0 #{log}" | |
Thread.new do | |
system('bundle exec thin start') | |
end | |
args = %W{tail -f #{log}} + [:err => [:child, :out]] |
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
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
# | |
# Nagios plugin to monitor delayed job active record queue | |
# | |
# will use mysql2 gem | |
# --dsn mysql2://root@localhost/portal_development | |
# |
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
keep=%w{3.5.0-41 3.5.0-42} | |
versions = Dir['/boot/System.map*'].sort.map do |f| | |
name = File.basename(f) | |
if name =~ /(\d+\.\d+\.\d+-\d+)/ | |
$1 | |
end | |
end | |
pkgs = [] |
NewerOlder