Skip to content

Instantly share code, notes, and snippets.

Omar Ferrer chamakits

Block or report user

Report or block chamakits

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View humble-bundle-direct-download-staggered.js
javascript: function runDownloadThing(howManyToDownload) {
if (!howManyToDownload) {
howManyToDownload = 3;
}
if (window['downloadSome']) {
window.downloadSome();
return;
}
var iter = $('div.download a.a:not([download])').toArray();
iter = iter.concat($('div.row a[download]').toArray());
@chamakits
chamakits / weird_borrowing_error.rs
Last active Jun 24, 2016 — forked from anonymous/playground.rs
Problemataic borrowing
View weird_borrowing_error.rs
struct NoLifetime {}
struct WithLifetime <'a> {
pub field: &'a i32
}
fn main() {
let mut some_val = NoLifetime{};
borrow_mut_function(&mut some_val);
borrow_mut_function(&mut some_val);//Borrowing as mutable for the second time.
let num = 5;
@chamakits
chamakits / playground.rs
Created Jun 24, 2016 — forked from anonymous/playground.rs
Shared via Rust Playground
View playground.rs
struct StructNoLifetime {}
impl StructNoLifetime {
pub fn do_nothing(&mut self) {
}
}
struct StructWithLifetime <'a> {
pub field: &'a i32
}
fn main() {
@chamakits
chamakits / hello_rust1-1_prints.rs
Last active Jun 14, 2016 — forked from anonymous/playground.rs
Shared via Rust Playground
View hello_rust1-1_prints.rs
fn main() {
println!("Hello everyone!");
println!(r#"First line!
We are here to learn about the language "{}",
a really neat language."#,
"Rust");
println!("Multiline.\
Ignores leading whitespace and newline");
}
View rust-force-tests.rs
macro_rules! assign_do_nothing {
( $( $x:expr ),* ) => {
{
$(
let _curr = $x;
)*
}
};
}
@chamakits
chamakits / playground.rs
Created Nov 2, 2015 — forked from anonymous/playground.rs
Shared via Rust Playground
View playground.rs
fn main() {
let s = "abc".to_string();
{
//println!("{}", s);
//sfun(s);
}
match s {
_ => {println!("{}", s)}
}
@chamakits
chamakits / playground.rs
Created Oct 28, 2015 — forked from anonymous/playground.rs
Shared via Rust Playground
View playground.rs
// open.rs
use std::error::Error;
use std::fs::File;
use std::io::prelude::*;
use std::path::Path;
use std::char;
fn main() {
let a = 'a' as u32;
let outer = 25;
View Removing Ctrl+Q From Firefox For Linux
This is a patch file for removing Ctrl+Q from firefox.
It works and was tested on Linux and Linux only (specifically, Ubuntu 14.04)
It changes multiple files, not sure which is the actual change that work. I'll be trying that soon.
Building Firefox was an extremely easy process, so if you have been bitten by this "Ctrl+Q" before, by all means, rebuild with this patch applied.
Although this is for Linux only, should be simple to figure out what to do for OS X or Windows. In time, I might try those out as well when I can test it.
You can’t perform that action at this time.