This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parse_git_branch_name { | |
git rev-parse --abbrev-ref HEAD | |
} | |
function parse_git_description { | |
git config branch.$(parse_git_branch_name).description | |
} | |
alias gs='echo $(parse_git_branch_name): $(parse_git_description) && git status' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A(object): | |
def __init__(self, key, value): | |
self.key = key | |
self.value = value | |
@property | |
def double_value(self): | |
return self.value * 2 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris aliquet metus non nunc scelerisque pretium. Nunc eu lobortis neque. Praesent vehicula feugiat consectetur. Morbi sit amet sapien in odio faucibus tristique eget quis leo. In auctor arcu ac venenatis aliquet. Sed imperdiet elementum mauris, nec semper justo vestibulum at. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam eleifend non ante at iaculis. Suspendisse at magna metus. Duis sit amet est enim. Integer sem lorem, varius sed erat et, cursus placerat nunc. Donec egestas eros sollicitudin neque suscipit, eu porttitor est dignissim. In erat quam, tincidunt et molestie at, condimentum ut velit. | |
Fusce tempor dolor augue, ut tincidunt ligula laoreet et. In placerat, justo in pharetra molestie, erat justo suscipit lorem, non vestibulum tellus magna tincidunt mauris. Aliquam erat volutpat. Suspendisse potenti. Interdum et malesuada fames ac ante ipsum primis in faucibus. Donec in nisi gravida, mollis est sit amet, condimentum mi. Duis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){alert(([].slice.call(document.querySelectorAll('.lines-added, .lines-removed')).reduce(function (a, el){return a + Number(el.innerHTML);},0)+' loc').replace(/^(?!-)/, '+'))})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You can find out your display id with displayplacer list | |
# Find displayplacer at https://github.com/jakehilborn/displayplacer | |
alias asusportrait='displayplacer "id:[your_display_id] degree:90 origin:(1920, 0)"' | |
alias asuslandscape='displayplacer "id:[your_display_id] degree:0 origin:(1920, 0)"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author Juha-Matti Santala / @hamatti | |
* | |
* This code is a bookmarklet that adds support to ON24.com's presentator view for arrow right/left and page down/up keys | |
* to switch slides. | |
* | |
* If your presentation clicker sends different keys to the computer when clicking next/prev, you can adjust the code by | |
* changing the if clauses | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This bookmarklet is for removing the live chat from YLE Areena | |
// Copy-paste the line below into the URL field of a new bookmark | |
javascript:(function() { document.getElementById('yle-livefeed').remove() })() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Card: | |
def __init__(self, id, name, supertype, subtype): | |
self.id = id | |
self.name = name | |
self.supertype = supertype | |
self.subtype = subtype | |
charizard = Card('ex3-100', 'Charizard', 'Pokemon', 'Stage 2') | |
lapras = Card('ex3-103', 'Lapras', 'Pokemon', 'Basic') | |
muscle_band = Card('xy1-121', 'Muscle Band', 'Trainer', 'Item') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Card: | |
def __init__(self, id, name, supertype, subtype): | |
self.id = id | |
self.name = name | |
self.supertype = supertype | |
self.subtype = subtype | |
def play_card(card): | |
match card: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Discord = require('discord.js'); | |
const cron = require('cron'); | |
const client = new Discord.Client(); | |
client.login(process.env.BOT_TOKEN); | |
const job = new cron.CronJob("00 00 10 * * *", () => { | |
client.channels.cache.get("[channel id]").send("Tick tock"); | |
}); |
OlderNewer