This file contains hidden or 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
#!/bin/bash | |
interval=$1 | |
command=$2 | |
while true; do | |
bash -c "$2" | |
sleep $interval | |
done |
This file contains hidden or 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
#!/bin/bash | |
sourceFile=$1 | |
targetDir=$2 | |
copyCount=$3 | |
sourceFileName=$(basename "$1") | |
sourceNumber=$(echo $sourceFileName | grep -oE '[0-9]+$'); | |
prefixLength=$((${#sourceFileName}-${#sourceNumber})) | |
prefix=${sourceFileName:0:$prefixLength} |
This file contains hidden or 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
ls sourceDir | grep -oP '^coolPrefix_\K.+' | awk '{print "cp sourceDir/coolPrefix_"$0 " targetDir/"$0}' | bash |
This file contains hidden or 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.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Text; | |
namespace Infrastructure | |
{ | |
public class RetardedProfiler |
This file contains hidden or 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
public class MyListener : IPostLoadEventListener | |
{ | |
public void OnPostLoad(PostLoadEvent @event) | |
{ | |
var entityFeatures = @event.Entity as EntityFeatures; | |
if (entityFeatures == null) | |
return; | |
if (entityFeatures.Values != null && entityFeatures.Values.Count != 0) | |
return; |
This file contains hidden or 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
git rev-list --no-merges RC_2.31 f3fe260995.. | | |
while read sha1; do | |
git show -s --format='%C(yellow)%h%Creset %C(green)%an%Creset %b' $sha1 | tr '\n' ' '; echo | |
done | | |
grep -v -i "CL:" |
This file contains hidden or 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
git rev-list --cherry-pick -i --grep="CL:\s*" RC_2.31 f3fe260995.. | | |
while read sha1; do | |
git show -s --format='%C(yellow)%h%Creset %C(green)%an%Creset %b' $sha1 | tr '\n' ' '; echo | |
done | | |
grep -v -i "CL:[[:space:]]*brak" |
This file contains hidden or 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
-- gets all fields from a hash as a dictionary | |
local hgetall = function (key) | |
local bulk = redis.call('HGETALL', key) | |
local result = {} | |
local nextkey | |
for i, v in ipairs(bulk) do | |
if i % 2 == 1 then | |
nextkey = v | |
else | |
result[nextkey] = v |
This file contains hidden or 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.IO; | |
using System.Threading; | |
namespace TestFileShare | |
{ | |
class Program | |
{ | |
static void Main() | |
{ | |
ThreadStart ts1 = () => |