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
############ REPLACE app/models/enterprise_token.rb in the source code with this file! ################ | |
############ also be sure to RESTART OpenProject after replacing the file. ################ | |
############ it doesn't show that enterprise mode is enabled in the settings, but all ################ | |
############ enterprise mode features, such as KanBan boards, are enabled. ################ | |
#-- copyright | |
# OpenProject is an open source project management software. | |
# Copyright (C) 2012-2023 the OpenProject GmbH | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License version 3. |
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
const EPOCH_DIFF = 11644473600'i64 | |
type FILETIME = object | |
dwLowDateTime: uint32 | |
dwHighDateTime: uint32 | |
proc toFileTime(tv: Timeval): FILETIME = | |
var mtime = EPOCH_DIFF + tv.tv_sec.int64 | |
mtime = mtime + tv.tv_usec * 10; | |
mtime = mtime * 10_000_000 |
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
Source: https://g751jy.wordpress.com/about/parrot-zik-bluetooth-headset/ | |
https://bbs.archlinux.org/viewtopic.php?id=194006 | |
Cached: http://webcache.googleusercontent.com/search?q=cache:4stTobIXSD0J:https://g751jy.wordpress.com/about/parrot-zik-bluetooth-headset/+&cd=3&hl=en&ct=clnk&gl=us | |
Bug and possible solution: actually I found a bug in that make the headset unusable, it seems that the pulse audio module: module-bluetooth-discover works only if started after the X11 session is up. So I have a workaround. | |
Edit the file: | |
/etc/pulse/default.pa |
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
{.compile: "MemoryModule.c".} | |
type | |
HMEMORYMODULE* = pointer | |
HMEMORYRSRC* = pointer | |
HCUSTOMMODULE* = pointer | |
{.push: cdecl, importc, discardable.} | |
proc MemoryLoadLibrary*(loc: pointer, size: int): HMEMORYMODULE |
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/sh | |
# Save this file on the on FD | |
# /usr/lib/bareos/plugins/mongo_bpipe.sh | |
#DBNAMES="" | |
#DBUSERNAME="" | |
#DBPASSWORD="" | |
#DBAUTHDB="" |
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
frontend www-http | |
bind :80 | |
bind *:443 ssl crt /etc/haproxy/certs no-sslv3 | |
capture request header X-Forwarded-For len 50 | |
acl is_cf req.hdr(cf-connecting-ip) -m found | |
http-request set-header X-Client-IP %[src] if !is_cf | |
http-request set-header X-Client-IP %[hdr(cf-connecting-ip)] if is_cf |
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 | |
mkdir ~/glibc_install; cd ~/glibc_install | |
wget http://ftp.gnu.org/gnu/glibc/glibc-2.14.tar.gz | |
tar zxvf glibc-2.14.tar.gz | |
cd glibc-2.14 |
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 macros | |
template value(x: untyped) {.pragma.} | |
proc init[T](t: typedesc[T]): T = | |
for k, v in result.fieldPairs: | |
if v.hasCustomPragma(value): | |
v = v.getCustomPragmaVal(value) | |
type | |
MyObj = object |
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 | |
command -v curl >/dev/null 2>&1 || { echo >&2 "curl is required"; exit 1; } | |
if [ "$1" == "" ]; then | |
echo "Usage: ${0} <warp+ id>" | |
exit 1 | |
fi | |
RUNNING=true | |
BOOSTED=0 |
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 prompt, unicode, terminal | |
proc autoComplete(line: seq[Rune], cursorpos: int): seq[string] {.gcsafe.} = | |
if line.len == 0: | |
return @[] | |
if $line == "hi": | |
result = @["Hello", "Xin chao", "Bonjour"] | |
else: |
NewerOlder