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
#!/bin/bash | |
numberoffiles=$1 | |
for i in `seq 1 $numberoffiles` | |
do dd if=/dev/zero of=`date +%N`.file bs=1024 count=16000 | |
done |
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
#!/bin/bash | |
dirno=1 | |
fileno=0 | |
for i in `ls *.JPG` | |
do | |
mod=$(($fileno%40)) | |
if [ "$mod" -eq "0" ] | |
then | |
dir="g$dirno" | |
mkdir $dir |
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
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
for { | |
fmt.Print("Enter text: ") |
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
package main | |
import ( | |
"database/sql" | |
"fmt" | |
_ "github.com/mattn/go-sqlite3" | |
"log" | |
"time" | |
) |
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
CREATE OR REPLACE FUNCTION fibonacci(num integer) | |
RETURNS SETOF numeric AS $$ | |
DECLARE | |
a numeric := 0; | |
b numeric := 1; | |
BEGIN | |
IF (num <= 0) | |
THEN RETURN; | |
END IF; | |
RETURN NEXT a; |
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
:%s/^Uzunluk\(.*\)$/^I^IUzunluk\1/g |
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
a file with hours:minutes:seconds | |
00:38:14 | |
16:31:37 | |
03:49:50 | |
04:14:06 | |
07:21:27 | |
03:10:47 | |
02:30:22 | |
01:45:49 |
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
import turtle | |
import random | |
import sys | |
def r(): | |
return random.randint(0, 255) | |
screen = turtle.Screen() | |
screen.bgcolor("#fff") | |
screen.colormode(255) |
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
&{ ForEach ($esx in Get-VMHost) { | |
$vCPU = Get-VM -Location $esx | Measure-Object -Property NumCpu -Sum | select -ExpandProperty Sum | |
$esx | Select Name, | |
@{N='pCPU cores available';E={$_.NumCpu}}, | |
@{N='vCPU assigned to VMs';E={$vCPU}}, | |
@{N='Ratio';E={[math]::Round($vCPU/$_.NumCpu,1)}}, | |
@{N='CPU Overcommit (%)';E={[Math]::Round(100*(($vCPU - $_.NumCpu) / $_.NumCpu), 1)}} | |
} } | Export-Csv report.csv -NoTypeInformation -UseCulture |
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
[array]$osNameObject = $null | |
$vmHosts = Get-VMHost | |
$i = 0 | |
foreach ($h in $vmHosts) { | |
Write-Progress -Activity "Going through each host in $vCenter..." -Status "Current Host: $h" -PercentComplete ($i/$vmHosts.Count*100) | |
$osName = ($h | Get-VM | Get-View).Summary.Config.GuestFullName | |
[array]$guestOSList += $osName | |
Write-Verbose "Found OS: $osName" |
OlderNewer