Skip to content

Instantly share code, notes, and snippets.

@urcadox
urcadox / gist:5678556
Created May 30, 2013 15:03
List of countries in the local language
"Afghanestan", "Al Arabiyah as Suudiyah", "Al Bahrayn", "Al Imarat al Arabiyah al Muttahidah", "Al Jaza'ir", "Al Kuwayt", "Al Maghrib", "Al Urdun", "Al Yaman", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Aomen", "Aotearoa", "Argentina", "Aruba", "As-Sudan", "Australia", "Azarbaycan", "Aṣ-Ṣaḥrā’ al-Gharbīyah ", "Bahamas", "Bangladesh", "Barbados", "Belau", "Belgique/Belgie", "Belize", "Benin", "Bermuda", "Bharat", "Bhutan", "Bod ", "Bolivia", "Bosna i Hercegovina", "Botswana", "Brasil", "Bulgaria", "Burkina Faso", "Burundi", "Byelarus", "Cabo Verde", "Cameroon", "Canada", "Cayman Islands", "Ceska Republika", "Chile", "Choson", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comores", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Crna Gora", "Cuba", "Danmark", "Dawlat Qatar", "Deutschland", "Dhivehi Raajje", "Djibouti", "Dominica", "Dominicana, Republica", "Éire", "Ecuador", "Eesti Vabariik", "El Salvador", "Ellas or Ellada", "España", "Estados Unidos M
@urcadox
urcadox / alarm.sh
Created April 22, 2013 21:44
Alarm script for PilotSSH
#!/bin/sh
tmux send -t alarm alarm SPACE $1 ENTER
echo "{ \"version\": 1, \"title\": \"Alarm\", \"type\": \"status\", \"status\": \"ok\", \"message\": \"Good night :)\"}"
@urcadox
urcadox / futureBad.scala
Created October 4, 2012 11:58 — forked from dyross/futureBad.scala
Scaling the Klout API with Scala, Akka, and Play
def blockingAndVerbose: Profile = {
val futureName = name()
val futureScore = score()
val futureFriends = friends()
val nameResult = Await.result(futureName, 10 seconds)
val scoreResult = Await.result(futureScore, 10 seconds)
val friendsResult = Await.result(futureFriends, 10 seconds)
Profile(nameResult, scoreResult, friendsResult)
#!/bin/sh
# netstat.sh
# AddiKT1ve <the.addikt1ve@gmail.com>
# Mwyann <http://mwyann.info>
# Variables
ETHIFACE=eth0
WLANIFACE=wlan0
TMPDIR=.
#!/bin/bash
#RAM
RAM=$(free -m | grep Mem: | awk '{print $3}')
let "ram = $RAM"
RAMBUFFER=$(free -m | grep Mem: | awk '{print $6}')
let "rambuffer = $RAMBUFFER"
RAMCACHE=$(free -m | grep Mem: | awk '{print $7}')
let "ramcache = $RAMCACHE"
let "ramused = ram-(rambuffer+ramcache)"
package code {
package snippet {
import net.liftweb.common._
import net.liftweb.util._
import net.liftweb.http._
import net.liftweb.http.SHtml._
import model._
import model.UserType._
package code {
package snippet {
import net.liftweb.common._
import net.liftweb.util._
import net.liftweb.http._
import model._
object Preferences extends LiftScreen {
package code {
package model {
import java.net.URL
import dispatch._
import dispatch.liftjson.Js._
import net.liftweb.json.JsonAST._
import net.liftweb
import net.liftweb.util.Helpers._
val embeddedVideo = for ( validPageURL <- tryo(new URL(pageURL)) ?~ "invalid url"
v <- new YoutubeEmbeddedVideo(validPageURL)) yield v
val embeddedVideo = for ( validPageURL <- tryo(new URL(pageURL))
v <- tryo(new YoutubeEmbeddedVideo(validPageURL))) yield v