๐ฟ
This file contains hidden or 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
package com.xpirator.db; | |
import java.sql.SQLException; | |
import com.j256.ormlite.android.AndroidCompiledStatement; | |
import com.j256.ormlite.android.AndroidDatabaseResults; | |
import com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper; | |
import com.j256.ormlite.stmt.PreparedQuery; | |
import com.j256.ormlite.stmt.StatementBuilder; |
This file contains hidden or 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
#!/usr/bin/env ruby | |
############################################### | |
# | |
# grokDir.rb | |
# | |
# Version 0.1 | |
# | |
# > ruby grokDir.rb -d "c:/Logs/**/*.log" -p "%{DATESTAMP:timestamp}" | |
# | |
############################################### |
This file contains hidden or 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
# change prefix key | |
set -g prefix C-a | |
unbind C-b | |
bind C-a send-prefix | |
# 'v' key for selection | |
bind-key -t vi-copy 'v' begin-selection | |
# base index | |
set -g base-index 1 |
This file contains hidden or 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
TaskBuilder.prototype.falldown = function(func, handler) { | |
var self = this; | |
Q.fcall(func).then(function(cb) { | |
return function(next) { | |
cb(function(fn, args) { | |
fn(args, next); | |
}); | |
}; | |
}).then(function(cb) { |
This file contains hidden or 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
// A => B | |
trait Functor[F[_]] { | |
def fmap[A, B](f: A => B): F[A] => F[B] | |
} | |
// F[A => B] | |
trait Applicative[F[_]] extends Functor[F] { | |
def pure[A](a: A): F[A] | |
def apply[A, B](f: F[A => B]): F[A] => F[B] | |
} |
This file contains hidden or 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
// 7.3.2 Capturing type constraints from Joshua's "Scala in Depth" | |
scala> def pop[A, C <: Seq[A]](col : C) = col.head | |
scala> pop(List(1, 2)) | |
// error: inferred type arguments [Nothing,List[Int]] do not conform to method pop's type parameter bounds [A,C <: Seq[A]] | |
// pop(List(1, 2)) | |
// ^ | |
scala> def pop[C, A](col : C)(implicit ev: C <:< Seq[A]) = col.head | |
scala> pop(List(1, 2)) |
This file contains hidden or 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
// 7.4.1 Heterogeneous typed list | |
/* | |
Scala๋ ์ค๋ฒ๋ก๋ฉ๊ณผ ์ค๋ฒ๋ผ์ด๋ฉ ๋คํ์ฑ์ ์ ์ข์ํจ. | |
์ค๋ฒ๋ก๋ฉ์ ํ๋ผ๋ฏธํฐ์ ํ์ ์ด ๋ฐํ์์์ ์ง์์ ธ ๋ฒ๋ฆผ | |
์ค๋ฒ๋ผ์ด๋ฉ์ ์์์ ํด์ผํ๋ค๋ ์ ํ ์์. | |
Scala๋ ํ์ ์์ฑ์๋ฅผ ์ด์ฉํ ๋คํ์ฑ์ ์ข์ํจ. | |
*/ | |
sealed trait HList {} |
This file contains hidden or 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 | |
exec scala -savecompiled "$0" "$@" | |
# Output | |
# -------------------------------------------------------- | |
# Node(1,Node(2,Leaf(4),Leaf(5)),Node(3,Leaf(6),Leaf(7))) | |
# ======================================================== | |
# size 7 | |
# height 3 | |
# leafCount 4 |
This file contains hidden or 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
sudo tshark -o "ssl.desegment_ssl_records: TRUE" \ | |
-o "ssl.desegment_ssl_application_data: TRUE" \ | |
-o "ssl.keys_list:192.168.0.1,443,http,your.key.pem" \ | |
-o "ssl.debug_file:ssldebug.log" \ | |
-f "tcp port 443" \ | |
-R "ssl" \ | |
-V -x |
This file contains hidden or 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
upstream php-phabricator-handler { | |
server unix:/run/php/php7.0-fpm.sock; | |
} | |
server { | |
listen 80; | |
server_name proj.felixlab.io; | |
return 301 https://$host$request_uri; | |
} |
OlderNewer