Skip to content

Instantly share code, notes, and snippets.

View whytrall's full-sized avatar
:shipit:

Sasha B whytrall

:shipit:
View GitHub Profile
import RickRoll.writer
object RickRoll { var writer: (String) -> Unit = { println(it) } }
val Never = RickAstleyNever // to get different highlighting color
object RickAstleyNever {
infix fun gonna(x: give) = give
infix fun gonna(x: let) = let
infix fun gonna(x: run) = run
infix fun gonna(x: make) = make
infix fun gonna(x: say) = say
@whytrall
whytrall / pcms.user.css
Created September 30, 2018 17:51
Beautiful and Nice PCMS
/*
Beautiful and Nice PCMS
Written by tg@trall
*/
/* General */
html {overflow-y: auto;}
body {
font-size: 14px;
def self.with_info(current_user, return_only_this_user = false)
sum = "SUM(CASE space_users.user_id WHEN #{current_user.id} THEN 1 ELSE 0 END)"
q = left_outer_joins(:space_users).distinct.select("spaces.*, COUNT(space_users.*) AS space_users_count, #{sum} AS current_user_is_in_space, space_users.created_at AS joined_at").group('spaces.id, space_users.id')
if return_only_this_user
q.having("#{sum} = 1")
else
q
end
end

Keybase proof

I hereby claim:

  • I am thetrall on github.
  • I am trall (https://keybase.io/trall) on keybase.
  • I have a public key whose fingerprint is AE96 9230 6DB2 311C F1CE 37A6 FC21 E6E5 58C5 3797

To claim this, I am signing this object:

@whytrall
whytrall / atom-style.less
Created June 3, 2017 01:27
My style for Atom w/ Seti Compact
atom-text-editor {
font-family: "FiraCode-regular";
}
li.texteditor.tab.sortable:not(.active) {
opacity: 0.5;
}
li.texteditor.tab.sortable:not(.active):hover {
opacity: 1;
}
@whytrall
whytrall / get_excel_password.vba
Created May 14, 2017 02:08
Excel Password Breaker
Sub PasswordBreaker()
'Breaks worksheet password protection.
Dim i As Integer, j As Integer, k As Integer
Dim l As Integer, m As Integer, n As Integer
Dim i1 As Integer, i2 As Integer, i3 As Integer
Dim i4 As Integer, i5 As Integer, i6 As Integer
On Error Resume Next
For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66

Keybase proof

I hereby claim:

  • I am trall1488 on github.
  • I am trall (https://keybase.io/trall) on keybase.
  • I have a public key whose fingerprint is AE96 9230 6DB2 311C F1CE 37A6 FC21 E6E5 58C5 3797

To claim this, I am signing this object:

.mail_box_single_ava .mail_box_single_ava_img, .friends_photo_img, .ui_zoom_inner, .post_img, .people_cell_img, .cell_img, .page_list_module .thumb, img.fc_contact_photo, .fans_idolph_wrap, .group_row_photo, .group_row_img, .right_list_img, .ow_ava, .top_notify_cont .feedback_img, .feedback_sticky_icon, .feedback_group_photo_img, .feedback_img, .fans_fan_img, .nim-peer .nim-peer--photo-w, .wall_module .reply_img, .feed_friend_image, .top_profile_img, .copy_post_img, .like_tt_image, .poll_tt_image, .mv_author_img, .olist_item_photo, .chat_tab_img, .mention_tt_img, .profile_career_img, .mention_tt_person_img, .page_group_image, .blog_about_link_pic, img.im_chatbox_mem_photo, .im-member-item .im-member-item--photo, .chat_tab_counter, .chat_tab_close, .nim-dialog.nim-dialog_unread .nim-dialog--unread, .nim-dialog.nim-dialog_unread.nim-dialog_prep-injected .nim-dialog--unread, .ui_ownblock_img, .bp_img, .dev_top_profile_link img, .group_box_image_wrap, .group_box_image_link, .wk_poll_usr, .ui_rmenu_count, .blst_im