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
// eslint-disable-next-line @typescript-eslint/no-explicit-any | |
function withContextProps<P, C extends React.Context<any>>( | |
component: React.FC<P>, | |
context: C, | |
hook?: (a: React.ContextType<C>, b: P) => Partial<P> | |
): React.FC<P> { | |
type CP = React.ContextType<C>; | |
type UP = CP & P; | |
const commonHook = (ctx: CP | null, p: P): UP => { | |
return ctx ? { ...ctx, ...p } : (p as UP); |
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 Ember from 'ember'; | |
let MODEL = Ember.A([ | |
Ember.Object.create({value: 1}), | |
Ember.Object.create({value: 2}), | |
Ember.Object.create({value: 3}), | |
Ember.Object.create({value: 4}) | |
]); | |
export default Ember.Controller.extend({ |
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 Ember from 'ember'; | |
const { | |
set, get, on, computed | |
} = Ember; | |
const MyClass = Ember.Object.extend({ | |
fullname: computed('profile', 'profile.name', 'profile.surname', function() { | |
console.log("resolve fullname"); |
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 Ember from 'ember'; | |
export default Ember.Component.extend({ | |
init: function() { | |
this._super(); | |
console.log("lala"); | |
}, | |
tagName: 'button', | |
classNameBindings: ['focused:focus'], | |
click: function(event) { |
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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle' | |
}); |
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
// @name thepressproject.gr clicker | |
// @namespace http://thepressproject.gr/#clickerscript | |
// @version 0.0.1 | |
// @author Kostas Papadimitriou <[email protected]> | |
// @description Fix thepressproject.gr links and context menu annoyances. | |
// @domain thepressproject.gr | |
// @domain www.thepressproject.gr | |
// @match http://www.thepressproject.gr/* | |
// @match https://www.thepressproject.gr/* | |
// @match https://thepressproject.gr/* |
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
diff --git snf-pithos-tools/pithos/tools/sh.py snf-pithos-tools/pithos/tools/sh.py | |
index f0ae12c..8dac56a 100755 | |
--- snf-pithos-tools/pithos/tools/sh.py | |
+++ snf-pithos-tools/pithos/tools/sh.py | |
@@ -225,12 +225,12 @@ class Meta(Command): | |
class CreateContainer(Command): | |
syntax = '<container> [key=val] [...]' | |
description = 'create a container' | |
- policy={} | |
+ policy={'versioning':'', 'quota':''} |
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
#Shell script for KDE launching CopperCore | |
DIRNAME=`dirname $0` | |
DIRNAME=`cd $DIRNAME; pwd` | |
PROGNAME=`basename $0` | |
# Add the CopperCore.properties to the class path | |
JBOSS_CLASSPATH="$DIRNAME:" | |
export JBOSS_CLASSPATH |
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
SET storage_engine=MYISAM; |
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/python | |
import os, sys, subprocess | |
from pyinotify import * | |
# the watch manager stores the watches and provide operations on watches | |
wm = WatchManager() | |
# watched events | |
mask = IN_DELETE | IN_CREATE | IN_MODIFY |
NewerOlder