Skip to content

Instantly share code, notes, and snippets.

View VinceMacBuche's full-sized avatar

Vincent Membré VinceMacBuche

View GitHub Profile
val f: String => Int = (s => s.length)
val g : Int => String = (i => i.toString)
implicit class Pipe[A,B](f : A => B) {
def |>[C] (g : C => A) : C => B = f.compose(g)
}
implicit class Apply[A](a : A) {
### Keybase proof
I hereby claim:
* I am vincemacbuche on github.
* I am macbuche (https://keybase.io/macbuche) on keybase.
* I have a public key ASDkIa00zpoMOk0-9O47WwN1hPOpQdBbnETk-7l8PkB_Xgo
To claim this, I am signing this object:
class file_enforce_content($file_name str, $file_content str) {
file $file_name {
content => $file_content
, state => "exists"
,
}
print "report ${file_name}" {
17:02:06 main.go:410: engine: file[/tmp/test2]: resource: chmodCheckApply(true)
17:02:06 main.go:410: engine: file[/tmp/test2]: resource: chownCheckApply(true)
17:02:06 main.go:410: engine: file[/tmp/test2]: CheckApply(true): Return(true, <nil>)
17:02:06 main.go:410: engine: print[report /tmp/test2]: CheckApply(true)
17:02:06 main.go:410: engine: print[report /tmp/test2]: resource: CheckApply: true
17:02:06 main.go:410: engine: print[report /tmp/test2]: resource: Msg: Fixed file /tmp/test2
17:02:06 main.go:410: engine: print[report /tmp/test2]: resource: print[report /tmp/test]: Msg: Fixed file /tmp/test
17:02:06 main.go:410: engine: print[report /tmp/test2]: CheckApply(true): Return(true, <nil>)
17:02:06 main.go:410: engine: autoedge: adding autoedges...
17:02:06 main.go:410: engine: autogroup: algorithm: wrappedGrouper: NonReachabilityGrouper...
@VinceMacBuche
VinceMacBuche / gist:b468a82b46fb38d22580eb1b9ef1dd6d
Created December 31, 2018 15:42
enforce_file_content mgmt
class file_enforce_content($file_name str, $file_content str, $audit_mode bool) {
file $file_name {
content => $file_content
, state => "exists"
, meta =>
struct{
noop => $audit_mode,
}
,
@VinceMacBuche
VinceMacBuche / npm install elm error
Created July 4, 2018 15:31
An error while installing elm using "npm install -g elm" on fedora 28, with node 8.11.3, npm 5.6.0
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install', '-g', 'elm' ]
2 info using npm@5.6.0
3 info using node@v8.11.3
4 verbose npm-session 7cd2efc8b7a96be8
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 200 https://registry.npmjs.org/elm 9ms (from cache)
8 silly pacote tag manifest for elm@latest fetched in 22ms
9 silly install loadIdealTree
INFO global: Vagrant version: 2.1.1
INFO global: Ruby version: 2.4.4
INFO global: RubyGems version: 2.6.14.1
INFO global: VAGRANT_DEFAULT_PROVIDER="virtualbox"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/bin/vagrant"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_LOG="debug"
WARN global: resolv replacement has not been enabled!
@VinceMacBuche
VinceMacBuche / Category
Last active August 22, 2016 14:29
Settings Rudder
Web : {
changeRequests : {
enabled
, selfValiation
, selfDeployment
}
, changeMessage : {
enabled
, mandatory
, explanation
rudder verbose: P: Container path : '/default/rudder_servers_by_role/vars/'roles[rudder-db]'[3]'
rudder verbose: P: .........................................................
rudder verbose:
rudder verbose: Skipping evaluation of classes promise as class 'role_rudder_web_server_defined' is already set
rudder verbose: Skipping evaluation of classes promise as class 'role_rudder_ldap_server_defined' is already set
rudder verbose: Skipping evaluation of classes promise as class 'role_rudder_inventory_endpoint_server_defined' is already set
rudder verbose: Skipping evaluation of classes promise as class 'role_rudder_db_server_defined' is already set
rudder verbose: === BEGIN summary of access promises ===
rudder verbose: Path: /usr/share/ncf/tree/
rudder verbose: admit_ips: 127.0.0.0/8
[vagrant@server ~]$ sudo -i
[root@server ~]# service network restart
Restarting network (via systemctl): Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details.
[FAILED]
[root@server ~]# systemctl status network.service
● network.service - LSB: Bring up/down networking
Loaded: loaded (/etc/rc.d/init.d/network)
Active: failed (Result: exit-code) since Wed 2016-07-13 16:32:01 UTC; 12s ago
Docs: man:systemd-sysv-generator(8)
Process: 11074 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=1/FAILURE)