Skip to content

Instantly share code, notes, and snippets.

View LBRapid's full-sized avatar
🏠
Working from home

John Dyer LBRapid

🏠
Working from home
View GitHub Profile
class HomeController < ApplicationController
def index
doc = Nokogiri::HTML(open('http://www.tenoaksnursery.com'))
@option = doc.css('option')
render :index
end
end
@LBRapid
LBRapid / autoexec.cfg
Created January 23, 2015 20:10
box crosshair
cl_crosshair_drawoutline 1
cl_crosshair_outlinethickness 1
cl_crosshaircolor 5
cl_crosshaircolor_b 255
cl_crosshaircolor_r 255
cl_crosshaircolor_g 255
cl_crosshairalpha 255
cl_crosshairthickness 2.6
cl_crosshairsize 0.5
cl_crosshairgap -1
---
:bulk_threshold: 1000
gem: --no-ri --no-rdoc
:verbose: true
gemcutter_key:
:benchmark: false
:update_sources: true
:backtrace: false
:sources:
- http://gemcutter.org
(ns server.core
(:require [compojure.core :refer :all]
[compojure.handler :refer [site]]
[ring.util.response :refer [response status]]
[ring.adapter.jetty :refer [run-jetty]]
[cheshire.core :as json]))
(def players (atom ()))
(defn list-players []
import java.util.concurrent.locks.ReentrantLock;
public class Interruptible {
public static void main(String[] args) throws InterruptedException {
final ReentrantLock l1 = new ReentrantLock();
final ReentrantLock l2 = new ReentrantLock();
Thread t1 = new Thread() {
public void run() {
public class Uninterruptible {
public static void main(String[] args) throws InterruptedException {
final Object o1 = new Object(); final Object o2 = new Object();
Thread t1 = new Thread() {
public void run() {
try {
synchronized(o1) {
Thread.sleep(1000);
public class Counting {
public static void main(String[] args) throws InterruptedException {
class Counter {
private int count = 0;
public synchronized void increment() { ++count; }
public int getCount() { return count; }
}
final Counter counter = new Counter();
class CountingThread extends Thread {
public void run() {
#include <stdio.h>
#include <stdlib.h>
int main()
{
char card_name[3];
int count = 0;
while (card_name[0] != 'X') {
puts("Enter the card name: ");
"images": [
{
"url": "http://dummyimage.com/600x400/000/fff.jpg&text=Spree T-Shirt"
},
{
"url": "http://dummyimage.com/600x400/000/fff.jpg&text=Spree T-Shirt2"
}
],
#!/usr/bin/env ruby
$stdout.sync = true
require File.join(File.expand_path('../..', __FILE__), %w[lib falkor])
puts 'You should not run this command with any worker running. Are all workers stopped [y/n]?'
exit 0 unless 'y' == gets.chomp.downcase
puts 'Update all legacy transforms [y/n]?'