Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@alpercelik
alpercelik / tips.md
Last active October 1, 2023 20:28
docker

on macos if you run

docker run -it --privileged --pid=host debian nsenter -t 1 -m -u -n -i sh

then you can access to image layers in /var/lib/docker/overlay2

@alpercelik
alpercelik / Install nodejs to latest on Intel Edison
Created March 13, 2018 16:04
Install nodejs to latest on Intel Edison
// remove existing version of node
$ opkg remove nodejs --force-depends
// let's go to /bin
$ cd /bin
// create node build folder and move into it
$ mkdir node && cd node
// download the version of node you'd like (just replace the version number)
@alpercelik
alpercelik / SQL Server table statistics
Created March 13, 2018 16:03
SQL Server table statistics
SELECT
t.NAME AS TableName,
s.Name AS SchemaName,
p.rows AS RowCounts,
SUM(a.total_pages) * 8 AS TotalSpaceKB,
CAST(ROUND(((SUM(a.total_pages) * 8) / 1024.00), 2) AS NUMERIC(36, 2)) AS TotalSpaceMB,
SUM(a.used_pages) * 8 AS UsedSpaceKB,
CAST(ROUND(((SUM(a.used_pages) * 8) / 1024.00), 2) AS NUMERIC(36, 2)) AS UsedSpaceMB,
(SUM(a.total_pages) - SUM(a.used_pages)) * 8 AS UnusedSpaceKB,
CAST(ROUND(((SUM(a.total_pages) - SUM(a.used_pages)) * 8) / 1024.00, 2) AS NUMERIC(36, 2)) AS UnusedSpaceMB
@alpercelik
alpercelik / cloudSettings
Last active April 10, 2018 23:37
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-04-10T23:37:18.867Z","extensionVersion":"v2.9.0"}
@alpercelik
alpercelik / Server response
Created January 21, 2012 23:50
example express server for testing http response splitting attack
HTTP/1.1 302 Moved Temporarily
X-Powered-By: Express
Content-Type: text/html
Location: http://localhost:3000/target?foo=bar
Set-Cookie: name=value
Connection: keep-alive
Transfer-Encoding: chunked
b6
<p>Moved Temporarily. Redirecting to <a href="http://localhost:3000/target?foo=bar