tcyrus
tcyrus
Reputation Top 1%
Timothy Cyrus
11 Snippets  (78th place)
Published
1 Channel
Created
4 Channels
Following
Jan 10, 2017
Last Visit
Dec 19, 2016
Registered
254 points  (106th place)
Reputation
Junior Code Generator
Serious Code Generator
Serious Popular Coder
Junior Autobiographer
Senior Autobiographer
Junior Famous Coder
Junior Wise Coder

Recent Snippets See all snippets by tcyrus

public by tcyrus created Apr 4, 2016  659  0  3  0

Arduboy Board for PlatformIO

Arduboy Board for PlatformIO: arduboy.json
{
    "arduboy": {
        "build": {
            "core": "arduino",
            "extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_LEONARDO",
            "f_cpu": "16000000L",
            "mcu": "atmega32u4",
            "pid": "0x8036",
            "usb_product": "Arduino Leonardo",
            "variant": "leonardo",
            "vid": "0x2341"
        },
        "frameworks": ["arduino"],
        "name": "Arduboy",
        "platform": "atmelavr",
        "upload": {
            "disable_flushing": true,
            "maximum_ram_size": 2560,
            "maximum_size": 28672,
            "protocol": "avr109",
            "require_upload_port" : true,
            "speed": 57600,
            "use_1200bps_touch": true,
            "wait_for_upload_port": true
        },
        "url": "https://www.arduboy.com/",
        "vendor": "Arduino"
    }
}

;

public by tcyrus created Mar 30, 2016  421  14  3  0

prayer in c

prayer in c: prayer.c
//http://pastebin.com/a2j8tk0B
#include <stdio.h>
#include <stdbool.h>

const char* pronoun(int number, bool plural)
{
    if (number==2) return "you";
    if (!plural) {if (number==1) return "i";}
    else if (number==1) return "we";
    return "they";
}

void dontthink(char who[100], char auxiliaryVerb[105], bool forgiveNotBelieve)
{
    printf(", don't think %s %s %s you.\n", who, auxiliaryVerb, forgiveNotBelieve ? "forgive" : "believe");
}

int main()
{
    int i, j;
    for (i = 1; i <= 2; i++) {
        for (j = 1;j <= 2; j++) {
            printf("Yah, you never said a word, you didn't send me no letter");
            dontthink(pronoun(1, false), "could", true);
            printf("See, our world is slowly dying and i'm wasting no more time");
            dontthink(pronoun(1, false), "could", false);
        }
        printf("Yah, our hands will get more wrinkled and our hair will be grey");
        dontthink(pronoun(1, false), "could", true);
        printf("And see, the children are starving and their houses were destroyed");
        dontthink(pronoun(3, true), "could", true);
        printf("Hey, when seas will cover lands and when men will be no more");
        dontthink(pronoun(2, false), "can", true);
        printf("Yah, when there'll just be silence and when life will be over");
        dontthink(pronoun(2, false), "will", true);
    }
    return 0;
}

;

public by tcyrus created Mar 29, 2016  915  0  3  0

Favorite Mac Icon Replacements

Favorite Mac Icon Replacements: icons.md
# Favorite Mac Icon Replacements

## Atom
* [Native UI - @ferdinandvogler](https://atom.io/themes/native-ui)
* [Atom Zion Style Icon - Alessandro Mingione](https://dribbble.com/shots/1809023-Atom-Zion-Style-Icon)
* [Atom Replacement Icon - Edward Loveall](https://github.com/edwardloveall/atom-replacement-icon)
* [Atom Icon - Trevor Kay](http://trevorkay.me/downloads/atom.zip)
* [Atom Icon - Meritt Thomas](https://dribbble.com/shots/2228635-Atom-Icon)
* [Atom Icon for Mac - Jonathan Simcoe](https://dribbble.com/shots/2567409-Atom-Icon-for-Mac)

## Helium
* [Helium Browser Icon - David Keegan](https://dribbble.com/shots/2313396-Helium-Browser-Icon)

## 

;

public by tcyrus created Mar 26, 2016  25404  0  3  0

Trying to make a new logo

Trying to make a new logo: logo.png
�PNG


IHDR9;3�?�	pHYs��tIME���iTXtCommentCreated with GIMPd.ePLTE���,�������������qtRNS@��fbKGDa���IDAT8����
� @Q�q�����؀�{��v��������ѠT�@+y���\d�����Ə�x�ĚU�'ff*sT��ͽs�@��,��g�-��׹�mY��M�)_�[i٩�S����jZ����%���ԡ�"�e+���:O�X6�f>���SF=�
U�TM�*��"g��Wqs�Z�8Ň�Z�T��eE����a=��i��xl�������qE�S��򘊠IEND�B`�

;

public by tcyrus created Jan 7, 2016  890  0  3  0

Homebrew formula for jart/hiptext (https://github.com/jart/hiptext)

Homebrew formula for jart/hiptext (https://github.com/jart/hiptext): hiptext.rb
require "formula"

class Hiptext < Formula
  homepage "https://github.com/jart/hiptext"
  head "https://github.com/jart/hiptext.git", :branch => "master"

  depends_on "pkg-config" => :build
  depends_on "ragel" => :build
  depends_on :libpng
  depends_on "jpeg"
  depends_on "ffmpeg"
  depends_on "freetype"
  depends_on "glog"

  patch :DATA

  #ENV["PKG_CONFIG_PATH"] = "#{HOMEBREW_PREFIX}/lib/pkgconfig:#{MacOS::X11.lib}/pkgconfig"

  #pkg-config --libs libavcodec libavformat libavutil libswscale
  def install
    system "make"
    system "install -m 0755 hiptext #{HOMEBREW_PREFIX}/bin"
  end
end

__END__
diff --git a/font.cc b/font.cc
index e3b3218..b9cf579 100644
--- a/font.cc
+++ b/font.cc
@@ -11,7 +11,7 @@
 #include "graphic.h"
 #include "pixel.h"

-DEFINE_string(font, "DejaVuSansMono.ttf",
+DEFINE_string(font, "/System/Library/Fonts/Monaco.dfont",
               "The path to the font .ttf file to use.");
 DEFINE_int32(font_index, 0, "Index of face to use inside font .ttf file.");
 DEFINE_int32(font_size, 11, "The size of the font in points.");
diff --git a/hiptext.cc b/hiptext.cc
index a23fa02..da0c96f 100644
--- a/hiptext.cc
+++ b/hiptext.cc
@@ -202,9 +202,9 @@ int main(int argc, char** argv) {
   google::ParseCommandLineFlags(&argc, &argv, true);
   google::InitGoogleLogging(argv[0]);
   google::InstallFailureSignalHandler();
-  const char* lang = std::getenv("LANG");
-  if (lang == nullptr) lang = "en_US.utf8";
-  std::locale::global(std::locale(lang));
+  //const char* lang = std::getenv("LANG");
+  //if (lang == nullptr) lang = "en_US.utf8";
+  //std::locale::global(std::locale(lang));
   InitFont();
   Movie::InitializeMain();

;