Skip to content

Instantly share code, notes, and snippets.

View wethu's full-sized avatar

Ellis wethu

  • Ellis Gray
  • Gold Coast
View GitHub Profile
@wethu
wethu / .diff
Created December 18, 2017 11:02
diff --git a/sys/dev/drm2/radeon/radeon.h b/sys/dev/drm2/radeon/radeon.h
index 4a63cf647332b..3063fa728feca 100644
--- a/sys/dev/drm2/radeon/radeon.h
+++ b/sys/dev/drm2/radeon/radeon.h
@@ -203,6 +203,8 @@ void radeon_pm_fini(struct radeon_device *rdev);
void radeon_pm_compute_clocks(struct radeon_device *rdev);
void radeon_pm_suspend(struct radeon_device *rdev);
void radeon_pm_resume(struct radeon_device *rdev);
+extern int radeon_pm_sysctl_init(struct drm_device *dev,
+ struct sysctl_ctx_list *ctx, struct sysctl_oid *top);
class Foo
def initialize(bar)
@bar = bar
end
def bar
@bar
end
end
def Foo(bar)
class FooController < ApplicationController
def download
file = Tempfile.new("foo")
file.write "foobar"
file.close
begin
send_file(file.open)
ensure
file.close
end
#!/usr/bin/env ruby -w
require "date"
puts "Enter Start Year:"
start_year = gets.to_i
puts "Enter End Year:"
end_year = gets.to_i
puts "These are the leap years:"
(Date.new(start_year)..Date.new(end_year)).select(&:leap?).uniq(&:year).map(&:year).each(&method(:puts))
@wethu
wethu / liquid_shell.rb
Created August 1, 2016 02:56 — forked from trishume/liquid_shell.rb
Liquid Templating Language REPL
require 'liquid'
require 'readline'
require 'colorize'
$state = {'test' => 5, 'wat' => "yup"}
def eval_liquid(str)
temp = Liquid::Template.parse(str)
temp.render($state)
end
n c *@:call <SNR>44_NetrwLcd(b:netrw_curdir)<CR>
Last set from /usr/local/Cellar/vim/7.4.335/share/vim/vim74/autoload/netrw.vim
n cS <Plug>CSurround
Last set from ~/.vim/bundle/vim-surround/plugin/surround.vim
n cs <Plug>Csurround
Last set from ~/.vim/bundle/vim-surround/plugin/surround.vim
n cgc <Plug>ChangeCommentary
Last set from ~/.vim/bundle/vim-commentary/plugin/commentary.vim
SELECT
`item_collections`.id AS OrderID,
`item_collections`.total AS OrderTotal,
CONVERT_TZ(`item_collections`.despatched_at,
'+00:00',
'+10:00') AS DespatchTime,
`item_collections`.status AS OrderStatus,
p.paid AS Paid,
p.received AS Received,
p.finalised AS PaidAt,
@wethu
wethu / app.m
Last active August 29, 2015 14:24
//
// AppDelegate.m
// codeonly
//
// Created by Ellis Gray on 23/06/2015.
// Copyright (c) 2015 Ellis Gray. All rights reserved.
//
#import "AppDelegate.h"
@interface AppDelegate () <UITableViewDataSource, UITableViewDelegate>
class Mailer < ActionMailer::Base
default :from => Devise.mailer_sender, :bcc => 'log@domain.net'
helper :mailer
def signup_reminder(user)
@name = user.first_name
subject = "Dont forget .. "
mail(:to => user.email, :subject => subject)
end
end
1: ~/.vimrc
2: ~/.vim/autoload/pathogen.vim
3: /usr/local/Cellar/vim/7.4.335/share/vim/vim74/syntax/syntax.vim
4: /usr/local/Cellar/vim/7.4.335/share/vim/vim74/syntax/synload.vim
5: /usr/local/Cellar/vim/7.4.335/share/vim/vim74/syntax/syncolor.vim
6: /usr/local/Cellar/vim/7.4.335/share/vim/vim74/filetype.vim
7: ~/.vim/bundle/jasmine/ftdetect/jasmine.vim
8: ~/.vim/bundle/vim-coffee-script/ftdetect/coffee.vim
9: /usr/local/Cellar/vim/7.4.335/share/vim/vim74/ftplugin.vim
10: /usr/local/Cellar/vim/7.4.335/share/vim/vim74/indent.vim