Skip to content

Instantly share code, notes, and snippets.

View wende's full-sized avatar

Krzysztof Wende wende

  • Neon Tree Solutions Ltd.
  • Gdańsk, Poland
View GitHub Profile
function firstNPrime(n){
var i = 1, j = 0, k = 0;
var result = []
while(++i && result.length != n){
k = i
j = 0
while(--k){
if(i % k == 0) j++
}
if(j == 1)result.push(i)
payload: [
%{
from: %Hedwig.JID{resource: "", server: "iot.net", user:""},
name: "delay",
payload: ["Offline Storage"],
stamp: "2015-08-28T10:01:23.226677Z",
xmlns: "urn:xmpp:delay"},
%{
int int_to_bin (unsigned int n){
unsigned char bytes[4];
bytes[0] = (n >> 24) & 0xFF;
bytes[1] = (n >> 16) & 0xFF;
bytes[2] = (n >> 8) & 0xFF;
bytes[3] = n & 0xFF;
return bytes;
}
@wende
wende / obrazy.js
Last active August 29, 2015 14:26
{'iphone': 'resources/splash/splash-320x480.png',
'iphone_2x': 'resources/splash/[email protected]',
'iphone5': 'resources/splash/[email protected]',
'ipad_portrait': 'resources/splash/splash-768x1024.png',
'ipad_portrait_2x': 'resources/splash/[email protected]',
'ipad_landscape': 'resources/splash/splash-1024x768.png',
'ipad_landscape_2x': 'resources/splash/[email protected]',
znajdz_3 ( [A, A, A | Rest] = T) -> T
znajdz_3 ( [ _ | Rest] ) -> znajdz_3 ( Rest )
function test_s(times){
var i = times;
var t = Date.now()
while(i--){
var a = 1
var b = 2
var c = 3
var d = 4
var e = 5
a = a * 5
sp.prop = () ->
gen_query(git, Data = #git{}) ->
Query_Git = "insert into erlproject_git " ++
" (id, name, full_name, owner_id, html_url, description," ++
" created_at, updated_at, pushed_at , clone_url," ++
" stars, open_issues, forks, source) values ('" ++
integer_to_list(Data#git.id) ++ "' , '" ++
Data#git.name ++ "' , '" ++
Data#git.full_name ++ "' , '" ++
integer_to_list(Data#git.owner#owner.id) ++ "' , '" ++
Data#git.html_url ++ "' , '" ++
.run ($location, $rootScope) ->
$rootScope.isActive = (path) ->
$location.path().replace(/\?.*/,"") == path