Skip to content

Instantly share code, notes, and snippets.

View peccu's full-sized avatar
🦉
Information is the network

peccu peccu

🦉
Information is the network
View GitHub Profile
@peccu
peccu / pm2.sh
Last active December 21, 2016 07:54
slackpost at specific time
ros -l slackpost.lisp run
(function(){
const old = document.getElementById('console');
if(old){
old.parentElement.removeChild(old);
window.console = window._console;
}
const setStyle = function(){
const s = document.createElement('style');
s.innerHTML = `
/* The console container element */
@peccu
peccu / app.lisp
Created December 8, 2016 09:46
:static with :mount
(ql:quickload :caveman-jscl)
(defpackage caveman-jscl.app
(:use :cl)
(:import-from :lack.builder
:builder)
(:import-from :ppcre
:scan
:regex-replace)
(:import-from :caveman-jscl.web
@peccu
peccu / default.html
Last active November 23, 2016 14:06
jscl with caveman for generating js from lisp if needs
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>{% block title %}{% endblock %}</title>
<link rel="stylesheet" type="text/css" media="screen" href="/css/main.css">
</head>
<body>
{% block content %}{% endblock %}
<script src="/js/jscl.js" type="text/javascript"></script>
@peccu
peccu / sample.json
Last active November 21, 2016 14:38
sexp as json like data
{
"some_key": {
"other_key": [
"one",
"two",
"three"
],
"with space": "value"
},
"number": 1.3456
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="robots" content="noindex, nofollow">
<meta name="googlebot" content="noindex, nofollow">
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.1.1/angular.min.js"></script>
<link rel="stylesheet" type="text/css" href="/css/normalize.css">
<link rel="stylesheet" type="text/css" href="/css/result-light.css">
<link rel="stylesheet" type="text/css" href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.0/css/bootstrap-combined.min.css">
@peccu
peccu / quickload-inquisitor.log
Created November 9, 2016 13:03
(ql:quick load "inquisitor") fails when LANG is not set
edison$ LANG='' ros -e '(ql:quickload "inquisitor")'
debugger invoked on a LOAD-SYSTEM-DEFINITION-ERROR in thread #<THREAD "main thread" RUNNING {AF43C91}>: Error while trying to load definition for system inquisitor from pathname /home/edison/.roswell/lisp/quicklisp/dists/quicklisp/software/
inquisitor-20160318-git/inquisitor.asd: READ error during LOAD: :ASCII stream decoding error on #<SB-SYS:FD-STREAM for "file /home/edison/.roswell/lisp/quicklisp/dists/quicklisp/software/inquisitor-20160318-git/README.markdown" {BC082A9}>:
the octet sequence #(229) cannot be decoded.(in form starting at line: 15, column: 29, file-position: 337)
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [ABORT ] Abort loading file "/home/edison/.roswell/lisp/quicklisp/dists/quicklisp/software/inquisitor-20160318-git/inquisitor.asd".
@peccu
peccu / clhs.ros
Last active November 7, 2016 03:02 — forked from fukamachi/clhs.ros
A Roswell script for opening HyperSpec page describing a given symbol in the default browser.
#!/bin/sh
#|-*- mode:lisp -*-|#
#|
exec ros -Q -- $0 "$@"
|#
#|
A Roswell script to open the HyperSpec page of a specified symbol in the default browser.
@peccu
peccu / copyToClipboard.js
Created November 6, 2016 06:16
copy text by JavaScript
// remove jQuery dependency from http://stackoverflow.com/a/31596687/514411
// Usage:
// copy(text, callback);
//
// Example:
// - without callback (defult callback alerts with copied text).
// copy('some text you want to copy');
// - with callback
// copy('some text', function(text){console.log('copied: ' + text);});
@peccu
peccu / corou.ros
Last active November 10, 2016 04:41
Common Lisp と 人工知能プログラミング 第10章の最後
#!/bin/sh
#|-*- mode:lisp -*-|#
#| <Put a one-line description here>
exec ros -Q -- $0 "$@"
|#
;; (progn ;;init forms
;; #+quicklisp (ql:quickload '() :silent t))
(defpackage :ros.script.corou.3687167986
(:use :cl))