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
/*************************************************************************** | |
** This file is part of the generic algorithm library Wiselib. ** | |
** Copyright (C) 2008,2012 by the Wisebed (www.wisebed.eu) project. ** | |
** ** | |
** The Wiselib is free software: you can redistribute it and/or modify ** | |
** it under the terms of the GNU Lesser General Public License as ** | |
** published by the Free Software Foundation, either version 3 of the ** | |
** License, or (at your option) any later version. ** | |
** ** | |
** The Wiselib is distributed in the hope that it will be useful, ** |
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
# build file written to describe the C and C++ source files to the Android NDK | |
LOCAL_PATH := $(call my-dir) | |
include $(CLEAR_VARS) | |
LOCAL_MODULE := debugTest | |
LOCAL_CXXFLAGS := -W | |
LOCAL_SRC_FILES := debug_test.cpp | |
#This definition is needed by wiselib | |
LOCAL_C_INCLUDES := /home/vasilakis/Development/wiselib/wiselib.testing/ \ | |
/home/vasilakis/Development/wiselib/wiselib.stable/ |
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
var GMAPS = window.GMAPS || {}; | |
GMAPS.mainMap = function() { | |
var map; | |
var infowindow = new google.maps.InfoWindow(); | |
var jsonObject = {}; | |
function addMarkers() { | |
var xhr = new XMLHttpRequest(); | |
xhr.open( "GET", "/home.json", true ); | |
xhr.onreadystatechange = function () { |
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
var GMAPS = window.GMAPS || {}; | |
GMAPS.mainMap = function() { | |
var map; | |
var infowindow = new google.maps.InfoWindow(); | |
var jsonObject = {}; | |
function addMarkers() { | |
var xhr = new XMLHttpRequest(); | |
xhr.open( "GET", "/home.json", true ); | |
xhr.onreadystatechange = function () { |
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
class TestClass | |
@class_var_alternative = "class_var_alternative" | |
class << self | |
attr_accessor :class_var_alternative | |
end | |
end | |
puts TestClass.class_var_alternative | |
TestClass.class_var_alternative = "new value" |
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 server; | |
public class PacketInfo { | |
private String sipAddress; | |
private String branch; | |
private String viaAddress; | |
public String receiverUser; | |
public String senderUsername; | |
public String senderAddress; |
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
#install essential stuff | |
sudo apt-get install build-essential autoconf locate | |
sudo apt-get install git guake zsh curl vim vim-gtk3 postgresql-client \ | |
postgresql postgresql-contrib redis golang direnv tmux bat ripgrep fzf | |
curl -L http://install.ohmyz.sh | sh | |
chsh -s /bin/zsh | |
zsh | |
#edit pg_hba.conf |
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
class Api::V1::UsersController < Api::V1::BaseController | |
skip_before_filter :authenticate_user, only: [:create, :resetpassword] | |
def index | |
users = policy_scope(User) | |
render json: users, each_serializer: Api::V1::UserSerializer | |
end | |
def resetpassword |
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
module AuthenticationHelper | |
def sign_in(user) | |
header('Authorization', "Token token=\"#{user.authentication_token}\", user_email=\"#{user.email}\"") | |
end | |
def create_and_sign_in_user | |
user = FactoryGirl.create(:user) | |
sign_in(user) | |
return user | |
end |
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
require 'rails_helper' | |
describe Api::V1::UsersController, type: :api do | |
context :index do | |
before do | |
5.times{ FactoryGirl.create(:user) } | |
5.times{ FactoryGirl.create(:admin) } | |
FactoryGirl.create(:super_admin) | |
sign_in(User.regular.last) | |
end |
OlderNewer