Skip to content

Instantly share code, notes, and snippets.

View arashi01's full-sized avatar

Ali Rashid arashi01

  • 08:38 (UTC +03:00)
View GitHub Profile
@arashi01
arashi01 / Navigation.scala
Created November 14, 2012 13:13
Foundation 3 top nav Lift snippet
package org.drugfreezanzibar.drugfreez
package snippet
import net.liftweb.sitemap.FlexMenuBuilder
import net.liftweb.http.DispatchSnippet
import xml.NodeSeq
object Navigation extends DispatchSnippet with FlexMenuBuilder {
override def expandAll: Boolean = true
////
import net.liftweb.common.{Logger, Loggable}
import net.liftweb.squerylrecord.RecordTypeMode._
import net.liftweb.squerylrecord.SquerylRecord
import org.squeryl.adapters.{PostgreSqlAdapter, H2Adapter}
import net.liftweb.util.Props
import org.squeryl.internals.DatabaseAdapter
import org.squeryl.Session
import java.sql.Connection
@arashi01
arashi01 / LiftTemplateEngine.scala
Last active December 13, 2015 17:49
Lift Scalate module modifications
import java.io.File
import tools.nsc.Global
import org.fusesource.scalate.layout.DefaultLayoutStrategy
import org.fusesource.scalate.util.{ClassPathBuilder, FileResourceLoader}
import org.fusesource.scalate.{DefaultRenderContext, ResourceNotFoundException, Binding, TemplateEngine}
import net.liftweb._
import common._
@arashi01
arashi01 / build.gradle
Created February 22, 2013 11:48
Lift project gradle build
apply plugin: 'scala'
apply plugin: 'war'
apply plugin: 'jetty'
def scalaVersion = '2.10.0'
def liftVersion = '2.5-M4'
repositories {
package bootstrap.liftweb
import net.liftweb._
import util._
import Helpers._
import common._
import http._
import sitemap._
import Loc._
$ git branch -r --merged |
grep origin |
grep -v '>' |
grep -v master |
xargs -L1 |
awk '{split($0,a,"/"); print a[2]}' |
xargs git push origin --delete
/**
* A monad to abstract dependencies in the code, see https://coderwall.com/p/kh_z5g
*/
object Reader {
/**
* an implicit to convert a function A => B in a Reader[A, B]
*/
implicit def reader[C, R](block: C => R): Reader[C, R] = Reader(block)
@arashi01
arashi01 / tc agent unit
Created May 21, 2014 16:06
Teamcity agent Systemd unit file
[Unit]
Description=TeamCity Build Agent
[Service]
Type=forking
User=teamcity
PIDFile=/opt/teamcity/logs/buildAgent.pid
ExecStart=/opt/teamcity/bin/agent.sh start
ExecStop=-/opt/teamcity/bin/agent.sh stop force
SuccessExitStatus=0 143
@arashi01
arashi01 / teamcity-agent.service
Created July 10, 2014 01:50
teamcity-agent as systemd service
[Service]
Type=oneshot
RemainAfterExit=true
User=teamcity
ExecStart=/opt/teamcity/bin/agent.sh start
ExecStop=-/opt/teamcity/bin/agent.sh stop force
SuccessExitStatus=0 143
[Install]
WantedBy=default.target
@arashi01
arashi01 / freeipa_auth_suse.md
Created June 10, 2019 19:32 — forked from Aethylred/freeipa_auth_suse.md
Setting up FreeIPA authentication onf SUSE/SLE 12 SP2

This is the manual process for enrolling a host running SUSE/SLE 12 SP2 with FreeIPA.

The following reference documentation was used to create this process:

I do not recommend using yast to set this up, however it is useful to check if the configuration is valid. SUSE/SLE has all the required packages to use FreeIPA but does not have the conveinent ipa-client tools, such as ipa-client-install.

Pre-Requisites