Skip to content

Instantly share code, notes, and snippets.

Nicolas Galler nicocrm

Block or report user

Report or block nicocrm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View cors-proxy.php
<?php
// Execute with php -S 0.0.0.0:3000 to serve API
// And point the client to http://localhost:3000/cors-proxy.php/api
//
$path = $_SERVER['PATH_INFO'];
$base_url = MY_BASE_URL;
$url = $base_url . $path;
if(isset($_SERVER["QUERY_STRING"])) {
$url = $url . '?' . $_SERVER["QUERY_STRING"];
View QFSDataGrid.WebControlRenderingTemplate.vm
#set($stringObjectName = "${pagegenerator.FormName}${qfcontrol.ControlId}_Strings")
## -----------Column and Grid macros -----------------------------------------------
#macro(doDefaultColParts $col)
field: '$col.DataField',
#if($col.TextFormatString != "")
displayFields: ['$col.DataField'],
displayFormatString: ${stringObjectName}['$generator.ConvertResourceKeyToScriptReference($col.getColResourceKey("FormatString"))'] || '$col.TextFormatString',
#end
#doHideCondition($col)
label: ${stringObjectName}['$generator.ConvertResourceKeyToScriptReference($col.getColResourceKey("ColumnHeading"))'] || '$col.ColumnHeading',
@nicocrm
nicocrm / switchByProp.js
Last active Mar 26, 2018
transitionProps - a HOC to help build transitions with react-transition-group v2. Very nice with styled-components.
View switchByProp.js
// build a switch function that examines a key/value collection based on an object literal,
// and return the first match
//
// Example usage:
// ```
// const result = switchBy({
// entering: 'A',
// entered: 'B',
// default: 'C'
// })(props)
@nicocrm
nicocrm / CrossOriginSupportModule.cs
Last active Apr 20, 2017 — forked from mmorton/CrossOriginSupportModule.cs
An IHttpModule for Enabling CORS
View CrossOriginSupportModule.cs
using System;
using System.Web;
namespace SSSWorld.CorsHelper
{
public class CrossOriginSupportModule : IHttpModule
{
public const string Options = "OPTIONS";
public const string Origin = "Origin";
public const string AccessControlRequestMethod = "Access-Control-Request-Method";
@nicocrm
nicocrm / xkb-colemak.xkb
Created Mar 14, 2017
xkbcomp map, for colemak layout, with the addition of the special layers accessible with Caps Lock, and accented (French) layer with Right Alt
View xkb-colemak.xkb
// xkbcomp map, for colemak layout
// - with the addition of the special layers accessible with Caps Lock,
// - and accented (French) layer with Right Alt
xkb_keymap {
xkb_keycodes "evdev+aliases(qwerty)" {
minimum = 8;
maximum = 255;
<ESC> = 9;
<AE01> = 10;
View spinner.css
/* Loading spinner in dashboard widgets */
@keyframes circles-loader {
0% {
transform: rotate(-720deg);
}
50% {
transform: rotate(720deg);
}
}
View xmodmap.colemak
!
! xmodmap for the Colemak layout.
! 2006-01-01 Shai Coleman, http://colemak.com/ . Public domain.
keycode 49 = grave asciitilde dead_tilde asciitilde
keycode 10 = 1 exclam exclam onesuperior
keycode 11 = 2 at masculine twosuperior
keycode 12 = 3 numbersign ordfeminine threesuperior
keycode 13 = 4 dollar cent sterling
keycode 14 = 5 percent EuroSign yen
@nicocrm
nicocrm / AutoHotkey.ahk
Last active May 10, 2016
Use caps as modifier, remapping letter keys to symbols
View AutoHotkey.ahk
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
#SingleInstance force
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
CapsLock & q:: Send, {\}
CapsLock & w:: Send, {=}
CapsLock & f:: Send, {[}
CapsLock & p:: Send, {]}
View ajaxLink.js
View cvim.css
#cVim-link-container, .cVim-link-hint, #cVim-command-bar, #cVim-command-bar-mode, #cVim-command-bar-input, #cVim-command-bar-search-results, .cVim-completion-item, .cVim-completion-item .cVim-full, .cVim-completion-item .cVim-left, .cVim-completion-item .cVim-right, #cVim-hud, #cVim-status-bar {
font-family: Helvetica, Helvetica Neue, Neue, sans-serif, monospace, Arial;
font-size: 10pt !important;
-webkit-font-smoothing: antialiased !important;
}
#cVim-link-container {
position: absolute;
pointer-events: none;
width: 100%; left: 0;
You can’t perform that action at this time.