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
#!/usr/bin/fish | |
set -x AR arm-linux-gnueabihf-ar | |
set -x CC arm-linux-gnueabihf-gcc | |
set -x CXX arm-linux-gnueabihf-g++ | |
set -x LINK arm-linux-gnueabihf-g++ | |
./configure --without-snapshot --dest-cpu=arm --dest-os=linux --prefix=/usr/local | |
make -j 2 |
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
module.exports = function(babel) { | |
const { types: t } = babel; | |
return { | |
visitor: { | |
ClassDeclaration(path, parent) { | |
if (path.isClassDeclaration()) { | |
const className = path.node.id.name; | |
if (!path.node.superClass || path.node.superClass.name !== 'Error') { | |
return; | |
} |
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
jQuery('.branches > .disabled a').map(function(i, node) { | |
return node.href.replace('http://ci.cahtech.com/browse/', '').replace('/editConfig', ''); | |
}).each(function(i, planKey) { | |
jQuery.ajax({ | |
url : 'http://ci.cahtech.com/chain/admin/deleteChain!doDelete.action', | |
method : 'POST', | |
data : { | |
buildKey : planKey, | |
save : 'Confirm' | |
}, |
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
type HOC<InputProps, EnhancedProps> = (component: React.ComponentType<InputProps & EnhancedProps>) => | |
React.ComponentType<InputProps>; | |
type RenderPropProps<InputProps, EnhancedProps> = { | |
[P in keyof InputProps]: InputProps[P]; | |
} & { | |
children: (props: EnhancedProps) => React.ReactNode; | |
}; | |
type RenderProp<InputProps, EnhancedProps> = React.ComponentType<RenderPropProps<InputProps, EnhancedProps>>; |
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 { Pipe, PipeTransform, ArgumentMetadata, BadRequestException } from '@nestjs/common'; | |
import { validate } from 'class-validator'; | |
import { plainToClass } from 'class-transformer'; | |
function isNil(obj: any): boolean { | |
return typeof obj === 'undefined' || obj === null; | |
} | |
@Pipe() | |
export class ValidationPipe<T, V> implements PipeTransform<any> { |
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 checkMap(m map[interface{}]interface{}, listName, value string) bool { | |
_list, ok := m[listName] | |
if !ok { | |
return false | |
} |
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
# Fish git prompt | |
set -g __fish_git_prompt_show_informative_status 1 | |
set -g __fish_git_prompt_hide_untrackedfiles 1 | |
set -g __fish_git_prompt_showdirtystate 'yes' | |
set -g __fish_git_prompt_showstashstate 'yes' | |
set -g __fish_git_prompt_showupstream 'yes' | |
set -g __fish_git_prompt_color_branch magenta bold |
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 | |
class JsonRpcClient { | |
protected $_url; | |
public function __construct($url) | |
{ | |
$this->_url = $url; | |
} |
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
public static function cache($name, $data = NULL, $lifetime = NULL) | |
{ | |
if (function_exists('apc_store')) | |
return self::_apc_cache($name, $data, $lifetime); | |
return parent::cache($name, $data, $lifetime); | |
} | |
protected static function _apc_cache($name, $data = NULL, $lifetime = NULL) | |
{ |
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
public function execute() | |
{ | |
$this->before(); | |
$method = $this->get_http_method(); | |
$this->_data = $this->{$method}(); | |
$this->after(); |
NewerOlder