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
>>> current = 89 | |
>>> new = 5 | |
>>> while current % 96 != new: | |
... print("Sending: " + str(current % 96)) | |
... current += 1 | |
... | |
Sending: 89 | |
Sending: 90 | |
Sending: 91 | |
Sending: 92 |
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
def test_loop(previous_quarter, quarter_index, max_quarter) do | |
while(previous_quarter % max_quarter != quarter_index) do | |
puts(quarter_index) | |
quarter_index += 1 | |
end | |
end |
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
>>> def test_loop(previous_quarter, quarter_index, max_quarter): | |
... while previous_quarter % max_quarter != quarter_index: | |
... print(previous_quarter % max_quarter) | |
... previous_quarter+=1 | |
... | |
>>> | |
>>> test_loop(10,10,20) | |
>>> test_loop(10,11,20) | |
10 | |
>>> test_loop(10,12,20) |
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 | |
sys="sudo /usr/bin/systemctl" | |
case "$1" in | |
s) shift 1 | |
$sys status $@ | |
;; | |
o) shift 1 |
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
git-test-conflict :: (master*) » git mergetool ~/tmp/git-test-conflict | |
Merging: | |
foo | |
Normal merge conflict for 'foo': | |
{local}: modified file | |
{remote}: modified file | |
Hit return to start merge resolution tool (vimdiff): | |
4 files to edit |
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
= /^Income:salary$/ | |
; [Accounts:checking] $ -200.00 | |
; [Budget:food] $ 200.00 | |
= /^Expense:food$/ | |
[Budget:food] -1.0 | |
[Accounts:checking] 1.0 | |
2014/04/13 Company Inc | |
Accounts:checking $ 1000.00 |
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
server { | |
index index.php; | |
location / { | |
try_files $uri /index.php?$args; | |
} | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; |
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
class Context(): | |
def __init__(self): | |
self.result = [] | |
self.current = {} | |
self.lastValue = 0 | |
def setBeginValue(self, value): | |
self.current['beginValue'] = value | |
def buildResult(self): |
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
host git.epinux.com robotns2.second-ns.de. ~ | |
Using domain server: | |
Name: robotns2.second-ns.de. | |
Address: 213.133.105.6#53 | |
Aliases: | |
git.epinux.com is an alias for epinux.com.epinux.com. | |
epinux.com.epinux.com is an alias for epinux.com.epinux.com. | |
epinux.com.epinux.com is an alias for epinux.com.epinux.com. |
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
<?php | |
function ipv6_cidr($subnet, $range, $ip) | |
{ | |
$bit_mask = mask_bits(128, $range); | |
$subnet = inet_pton($subnet) & $bit_mask; | |
return (inet_pton($ip) & $bit_mask) == $subnet; | |
} | |
function mask_bits($total_length, $mask_length) |
OlderNewer