Skip to content

Instantly share code, notes, and snippets.

View cpoile's full-sized avatar

Christopher Poile cpoile

View GitHub Profile
@cpoile
cpoile / index.html
Created April 18, 2023 20:44
Electron MAS red transparent window with AMD graphics
<html>
<head>
<style>
body {
width: 100vw;
height: 100vh;
}
</style>
</head>
<body>
@cpoile
cpoile / workflow.json
Last active January 7, 2020 22:38
Example workflow.json working with Master (Beta - after moving to storing Ids)
[
{
"name": "security_issue",
"triggers": [
{
"name": "IssueReported",
"type": "text",
"match": "#sec",
"channel_name": "",
"team_name": ""
;; built on: https://gist.github.com/zdavkeos/1279865
;; and ediff-util (GNU Emacs)
;;
;; diff-region-with-killring* - Diff the current region with the
;; region that was most recently killed (cut or copied). The
;; highlighted region is called Region.B during the ediff session.
;; Changes made to the highlighted region (Region.B) will be saved
;; when quitting the ediff session. This is designed to be similar to
;; the 'compare with clipboard' function in IntelliJ IDEA.
;;
@cpoile
cpoile / expand-region-examples
Created October 19, 2013 03:35
Examples that fail when trying to expand region.
* This is a test (expand works here for me.)
** With no src blocks, highlighting will work just fine (expand works here for me.)
* But, with src blocks: (expand works here for me.)
** in a subtree (A) (expand doesn't work here for me.)
Test test test test. Test test test. (expand works here for me.)
*** in a subsubtree (B) (expand doesn't work here for me.)
#+header: :tangle yes (expand doesn't work here for me.)
#+begin_src emacs-lisp
(+ 1 1)
#+end_src
@cpoile
cpoile / plugins.sbt
Created May 10, 2012 16:44
Vaadin plugins.sbt file
// xsbt-web-plugin
resolvers += "Web plugin repo" at "http://siasia.github.com/maven2"
resolvers += "Jawsy.fi M2 releases" at "http://oss.jawsy.fi/maven2/releases"
libraryDependencies <+= sbtVersion(v => "com.github.siasia" %% "xsbt-web-plugin" % (v+"-0.2.11"))
// sbt idea
resolvers += "sbt-idea-repo" at "http://mpeltonen.github.com/maven/"
@cpoile
cpoile / build.sbt
Created May 10, 2012 16:39
Vaadin build.sbt file
import net.thunderklaus.GwtPlugin._
name := "Scala Experiment Server"
scalaVersion := "2.9.1"
seq(gwtSettings: _*)
gwtVersion := "2.4.0"
@cpoile
cpoile / DataHolder.coffee
Created May 8, 2012 22:01 — forked from Shadowfiend/DataHolder.coffee
DataHolder is used to manage model objects with knockout observable values.
# DataHolder handles most Knockout binding situations for properties
# transparently. You can instantiate a DataHolder with a set of attributes
# that are turned into observable properties of the DataHolder.
#
# Attributes passed in that are functions are not wrapped in an observable.
# Additionally, all attributes whose names end in `Fn' are ensured to be
# wrapped in functions and set as is, without an observable.
#
# All attributes are passed through the preprocessAttribute function, which
# can be overridden in child classes. These can be used to do type
@cpoile
cpoile / package.scala
Created May 8, 2012 22:01 — forked from Shadowfiend/package.scala
Functions for extracting field names for Lift server-side functions as Strings.
package com {
package object openstudy {
def nameForStringField(fn:(String)=>Any) : String = {
S.fmapFunc(S.SFuncHolder(string => fn(string)))((name:String) => name)
}
def nameForFileUploadField(fn:(FileParamHolder)=>Any) : String = {
S.fmapFunc(S.BinFuncHolder(fph => if (fph.length > 0) fn(fph)))((name:String) => name)
}
def nameForSubmitButton(fn:()=>JsCmd) : String = {
S.fmapFunc(S.NFuncHolder(fn))((name:String) => name)