Skip to content

Instantly share code, notes, and snippets.

View can3p's full-sized avatar

Dmitrii Petrov can3p

View GitHub Profile
@can3p
can3p / gist:b7b2470dc8129451b9d37f5ad9dcf84a
Created September 28, 2017 08:33
trivial-gamekit error
(ql:quickload :trivial-gamekit)
To load "trivial-gamekit":
Load 1 ASDF system:
trivial-gamekit
; Loading "trivial-gamekit"
.....................; Total of 0 load-time skipped definitions
; Total of 0 load-time missing entities
.; Note: skipping alias of type %ODE::__DARWIN_INTPTR_T to %ODE::INTPTR-T due
; to undefined foreign type: __DARWIN_INTPTR_T
; Note: skipping determine the basic type of foreign type
@can3p
can3p / restart_bluetooth.sh
Created March 17, 2016 08:38 — forked from nicolasembleton/restart_bluetooth.sh
Restart Bluetooth Daemon on Mac OS X without restarting
#!/bin/bash
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
@can3p
can3p / lj_trash
Created March 16, 2016 21:17
Russia blogs worth skipping
000zzz
0_l_g_a
0na_samaya
1way_to_english
2101
3eta
3ojlotou
477768
777ru
__doll__
var pipeline = require('when/pipeline')
, callbacks = require('when/callbacks');
var mockMakeAjaxRequestAndReturnCallback = callbacks.lift(require('mockMakeAjaxRequestAndReturnCallback'));
var mockRenderData = require('mockRenderData');
var generateLink = function (domain) {
return 'http://' + domain + '/resource';
};
@can3p
can3p / diary.bash
Created July 10, 2013 20:57
Diary function in bash
log() {
LOG_PATH=~/Dropbox/diary/
FNAME=`date "+%Y-%m-%d"`.md
HEADER="
*************************************
Time: `date \"+%H:%M:%S\"`
Subject:
Mood:
Music:
@can3p
can3p / pr.md
Created March 25, 2013 20:58 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

Function FileExists(ByVal fname As String) As String
Dim objFSO As Object
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(fname) Then
FileExists = "1"
Else
FileExists = "0"
End If
@can3p
can3p / alive.vba
Created March 21, 2013 17:26
chech url in vba
Function Alive(ByVal url As String) As String
Dim result As String
Dim winHttpReq As Object
Set winHttpReq = CreateObject("WinHttp.WinHttpRequest.5.1")
winHttpReq.Open "GET", url, False
On Error Resume Next
winHttpReq.Send
If Err.Number = 0 Then
@can3p
can3p / gist:4055931
Created November 11, 2012 19:15
jitsu deploy
$ jitsu deploy
info: Welcome to Nodejitsu nko3-vermishel-team
info: jitsu v0.11.3, node v0.8.12
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing application dependencies in node lib/server.js
info: Creating snapshot 0.0.8-6
info Uploading: [=============================] 100%
info: Updating app nko3-vermishel-team
info: Activating snapshot 0.0.8-6 for nko3-vermishel-team
@can3p
can3p / gist:4046235
Created November 9, 2012 15:12
commonjs + amd wrapper
do (exports = if typeof exports == 'undefined' then undefined else exports) ->
module = ->
#example module content
_ = require 'underscore'
_([3,1,2]).sort()
return {
a: ->
b: ->
}