Skip to content

Instantly share code, notes, and snippets.

⌨️
Click! Clack!

Łukasz Jan Niemier hauleth

⌨️
Click! Clack!
Block or report user

Report or block hauleth

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 gist:5abe8d2a4cc6156445767325c429e801
### Keybase proof
I hereby claim:
* I am hauleth on github.
* I am hauleth (https://keybase.io/hauleth) on keybase.
* I have a public key ASC0dZl_5-9qDXYdx41ee4Hg-qPbyRBmapJevdcVdwy5Rwo
To claim this, I am signing this object:
View au.rs
extern crate rayon;
extern crate regex;
extern crate scan_dir;
use rayon::prelude::*;
use regex::Regex;
use scan_dir::ScanDir;
use std::env;
use std::fs::File;
View -
fn witness(num: BigInt, a: BigInt, d: &BigInt, s: usize) -> Result {
let mut x = (&a).pow_mod(d, &num);
if x == one() || x == (&num - BigInt::one()) { return Result::Composite }
for _ in 0..s {
x = (&x * &x) % #
if x == one() { return Result::Composite }
if x == (&num - BigInt::one()) { return Result::PropablyPrime }
}
View boot
# Example answer file for setup-alpine script
# If you don't want to use a certain option, then comment it out
# Use US layout with US variant
KEYMAPOPTS="us us"
# Set hostname to alpine-test
HOSTNAMEOPTS="-n alpine"
# Contents of /etc/network/interfaces
View .gdbinit
# INSTALL INSTRUCTIONS: save as ~/.gdbinit
#
# DESCRIPTION: A user-friendly gdb configuration file, for x86/x86_64 and ARM platforms.
#
# REVISION : 8.0.5 (18/08/2013)
#
# CONTRIBUTORS: mammon_, elaine, pusillus, mong, zhang le, l0kit,
# truthix the cyberpunk, fG!, gln
#
# FEEDBACK: http://reverse.put.as - reverser@put.as
View -
Fresh gcc v0.3.8
Fresh pkg-config v0.3.5
Fresh bitflags v0.3.0
Fresh libc v0.1.8
Fresh openssl-sys v0.6.3
Fresh libz-sys v0.1.6
Fresh curl-sys v0.1.24
Fresh libucl-sys v0.1.5
Fresh ucl v0.1.3 (file:///home/hauleth/Workspace/ucl-rs)
Running `/home/hauleth/Workspace/ucl-rs/target/debug/ucl-49bf07184c877340`
View -
Compiling libucl-sys v0.1.4
Running `rustc /home/hauleth/.multirust/toolchains/beta/cargo/registry/src/github.com-1ecc6299db9ec823/libucl-sys-0.1.4/build.rs --crate-name build_script_build --crate-type bin -C prefer-dynamic -g --out-dir /home/hauleth/Workspace/ucl-rs/target/debug/build/libucl-sys-99c2c324b1dfccd4 --emit=dep-info,link -L dependency=/home/hauleth/Workspace/ucl-rs/target/debug/deps -L dependency=/home/hauleth/Workspace/ucl-rs/target/debug/deps -Awarnings`
Compiling libc v0.1.8
Running `rustc /home/hauleth/.multirust/toolchains/beta/cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.1.8/rust/src/liblibc/lib.rs --crate-name libc --crate-type lib -g --cfg feature="cargo-build" --cfg feature="default" -C metadata=2eda841eb12a3090 -C extra-filename=-2eda841eb12a3090 --out-dir /home/hauleth/Workspace/ucl-rs/target/debug/deps --emit=dep-info,link -L dependency=/home/hauleth/Workspace/ucl-rs/target/debug/deps -L dependency=/home/hauleth/Workspace/ucl-rs/target/debug/deps -Awarnings`
View gist:c3c4d5b4cfb81ebcdb4b
Output:
std::cout bez sync_with_stdio(0)
real 0m0.084s
user 0m0.083s
sys 0m0.000s
std::cout z sync_with_stdio(0)
real 0m0.078s
View shell.rb
#!/usr/bin/env ruby
loop do
print '> '
exit 0 if gets.strip == 'exit'
puts 'USUŃ KONTO!'
end
View gist:9542164d7f05573b021e
class Listing < ActiveRecord::Base
if Rails.env.development?
has_attached_file :image, :styles => { :medium => "200x>", :thumb => "100x100>" }, :default_url => "404.png"
validates_attachment_content_type :image, :content_type => ["image/jpg", "image/jpeg", "image/png", "image/gif"]
else
has_attached_file :image, :styles => { :medium => "200x>", :thumb => "100x100>" }, :default_url => "404.png",
:storage => :dropbox,
:dropbox_credentials => Rails.root.join("config/dropbox.yml"),
:path => ":style/:id_:filename"
validates_attachment_content_type :image, :content_type => ["image/jpg", "image/jpeg", "image/png", "image/gif"]
You can’t perform that action at this time.