Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <cstdlib>
#include <algorithm>
#define LEN 256
char* dec2bin(int dec);
int main(int argc, char *argv[]) {
if(argc != 2) {
std::cout << "Input is required" << std::endl;
require 'superators19'
class Range
superator '>>+' do |something|
[].tap { |ary|
self.each { |i|
ary << something.new
}
}
end
class Pokemon
def initialize(&block)
@var = []
instance_eval &block
end
def method_missing(m, *args, &block)
if args.any?
args = args.first if args.length == 1
@var << { m => args }
class Dialogues
def initialize(&block)
@var = []
instance_eval &block
end
def method_missing(m, *args, &block)
if args.any?
args = args.first if args.length == 1
@var << { m => args }
json: {
name: Arnoldo,
surname: di Guascogna,
age: 58
}
ws: charset reduce [space tab cr lf]
letter: charset [#"a" - #"z" - #"A" - #"Z"]
parse json tags: [
#!/usr/bin/env ruby
###########################################
#
alpha = { :a=>'._', :b=>'_...', #
:c=>'_._.', :d=>'_..', #
:e=>'.', :f=>'.._.', #
:g=>'__.', :h=>'....', #
:i=>'..', :j=>'.___', #
:k=>'_._', :l=>'._..', #
require 'net/ftp'
require 'fileutils'
require 'clipboard'
require 'bitly'
require 'rubyfish'
class String
def fix
gsub(/\\/, ?/).force_encoding('iso-8859-1').encode('utf-8')
end
ALTER TABLE episodes ALTER editing SET DEFAULT null;
ALTER TABLE episodes
ALTER editing TYPE smallint
USING
CASE
WHEN editing THEN 2 else 1
END;
ALTER TABLE episodes ALTER editing SET DEFAULT 1;
require 'benchmark'
require 'observer'
require 'alakazam'
class Logger
def update(*things)
#
end
end
#include <stdio.h>
#include <windows.h>
HWND GetConsoleHwnd(void)
{
#define MY_BUFSIZE 1024 // Buffer size for console window titles.
HWND hwndFound; // This is what is returned to the caller.
char pszNewWindowTitle[MY_BUFSIZE]; // Contains fabricated
// WindowTitle.
char pszOldWindowTitle[MY_BUFSIZE]; // Contains original