This file contains hidden or 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 | |
TEMP=$(nvidia-smi -q -d temperature | grep "GPU Current" | tail -n 1 | cut -d ":" -f 2 | cut -d " " -f 2) | |
DEVICE=/sys/devices/platform/nct6775.2608/hwmon/hwmon2/pwm1 | |
echo 1 > /sys/devices/platform/nct6775.2608/hwmon/hwmon2/pwm1_enable | |
while true; do | |
TEMP=$(nvidia-smi -q -d temperature | grep "GPU Current" | tail -n 1 | cut -d ":" -f 2 | cut -d " " -f 2) |
This file contains hidden or 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
#!/usr/bin/env bash | |
expandPath() { | |
case $1 in | |
~[+-]*) | |
local content content_q | |
printf -v content_q '%q' "${1:2}" | |
eval "content=${1:0:2}${content_q}" | |
printf '%s\n' "$content" | |
;; |
This file contains hidden or 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() { | |
i := TheImplementation{Value: 0} | |
// simple, changes the value as expected | |
toPointer(&i) | |
fmt.Printf(" V: %d \n", i.Value) | |
This file contains hidden or 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
My Awesome Sketch | |
First State | |
some event -> Second State | |
Second State |
This file contains hidden or 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
My Awesome Sketch | |
First State | |
some event -> Second State | |
Second State |
This file contains hidden or 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 | |
use eZ\Publish\API\Repository\Values\Content\Search\Facet; | |
class IntervalFacet extends Facet | |
{ | |
/** | |
* @var array | |
*/ | |
public $entries; |
This file contains hidden or 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
%% initial_state return {ok, State} or {error, State} | |
%% before | |
play(Context) -> | |
play(Context, initial_state(Context)). | |
%% after | |
play(Context) -> | |
{ok, State} = initial_state(Context), |
This file contains hidden or 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 | |
namespace WodorNet\Vindinium; | |
class Board | |
{ | |
public function getSurroundingPassableTiles(Position $position) | |
{ | |
foreach ($this->surroundingTiles($position) as $tile) { | |
if ($tile->isPassable()) { |
This file contains hidden or 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
function testRepositoryUsage() | |
{ | |
$id = 42; | |
$value = array('results'); | |
$repo = $this->getMock('Repository\FindsStuffInCity'); | |
$repo->expects($this->once()) | |
->method('findByCityId') | |
->with($id) | |
->will($this->returnValue($value)); |
NewerOlder