Skip to content

Instantly share code, notes, and snippets.

View lcostea's full-sized avatar
💭
K8s, GitOps, go

Liviu Costea lcostea

💭
K8s, GitOps, go
View GitHub Profile
@lcostea
lcostea / web.config
Created November 12, 2017 09:48
web.config example for rewrite rules, useful when deploying a JS app to an IIS instance
<?xml version="1.0"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="React Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
/****** Object: Table [dbo].[AgencyGeneralInfo] Script Date: 6/12/2016 5:47:16 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[AgencyGeneralInfo](
[Id] [int] IDENTITY(1,1) NOT NULL,
[InvoiceInfoId] [int] NULL,
sudo yum -y install http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-redhat94-9.4-1.noarch.rpm
sudo yum -y install postgresql94-server postgresql94-contrib postgresql94-client pgadmin3_94
sudo yum -y install epel-release
sudo yum -y install python-pip python-devel gcc git libffi-devel openssl-devel
sudo `which pip` install --upgrade pip
sudo `which pip` install ansible "pywinrm>=0.1.1"
sudo yum -y install krb5-devel krb5-libs krb5-workstation
var buildTasks = [];
files.forEach(function (sassFile) {
var buildTaskName = 'build-sass-' + sassFile;
gulp.task(buildTaskName, function () {
return gulp.src(sassFile)
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest(websiteConfig.sassFolder));
});
local apiCallCount
apiCallCount = redis.call("incr", KEYS[1])
if tonumber(apiCallCount) == 1 then
redis.call("expire",KEYS[1], 60)
end
return apiCallCount
local zsetMembers = redis.call('ZRANGE', KEYS[1], '0', '-1')
for _,member in pairs(zsetMembers) do
redis.call('ZINCRBY', KEYS[1], '1', member)
end
Zadd months 2 "March"
Zadd months 1 "February"
Zadd months 0 "January"
Zrange months 0 -1 WITHSCORES
local redisValue = redis.call('GET', KEYS[1])
if redisValue then
redis.call('EXPIRE', KEYS[1], ARGV[1])
return redisValue
end
return nil
setex LoggedInUser 60 "LiviuCostea"
KEYS "Users*"
SCAN 0 MATCH "Users*" COUNT 5
LRANGE Posts:Newest 0 -1 --returning all
LRANGE Posts:Newest 0 15 --returning top 15, if exist
LTRIM Posts:Newest 0 9
ZRANGE Posts:Top 0 -1 WITHSCORES
SADD Job:Developer "email.lcostea@gmail.com"
SADD Job:Developer "developer@redis.io"
SADD Job:Tester "tester@testing.com"
SADD City:Iasi "email.lcostea@gmail.com"
SADD City:Iasi "developer@redis.io"
SADD City:Brasov tester@testing.com