Skip to content

Instantly share code, notes, and snippets.

View SyntaxC4's full-sized avatar
🏠
Working from home

Cory Fowler SyntaxC4

🏠
Working from home
View GitHub Profile
;Read more: http://php.net/manual/en/session.configuration.php#ini.session.cookie-httponly
session.cookie_httponly=1
@SyntaxC4
SyntaxC4 / main.py
Created December 12, 2014 22:31
Connecting to Azure Redis Cache from Python
import redis
r = redis.StrictRedis(host='[cache-name].redis.cache.windows.net', port=6380, db=0, password='[access-key]', ssl=True)
r.set('foo','bar')
result = r.get('foo')
print result
@SyntaxC4
SyntaxC4 / web.config
Last active August 29, 2015 14:25
Laravel 5.1.4 Web.config
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^(.*)/$" ignoreCase="false" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Redirect" redirectType="Permanent" url="/{R:1}" />
@SyntaxC4
SyntaxC4 / Microsoft.PowerShell_profile.ps1
Last active August 29, 2015 14:25
My PowerShell Profile
$HOST.UI.RawUI.ForegroundColor="Green"
$HOST.UI.RawUI.BackgroundColor="Black"
Function gig {
param(
[Parameter(Mandatory=$true)]
[string[]]$list
)
$params = $list -join ","
Invoke-WebRequest -Uri "https://www.gitignore.io/api/$params" | select -ExpandProperty content | Out-File -FilePath $(Join-Path -path $pwd -ChildPath ".gitignore") -Encoding ascii