Skip to content

Instantly share code, notes, and snippets.

View StevenKowalzik's full-sized avatar
🛹

Steven Kowalzik StevenKowalzik

🛹
View GitHub Profile
@argyleink
argyleink / is.css
Last active December 9, 2022 20:15
light intro to the :is() selector syntax and value
/* before :is() */
button.focus,
button:focus {
...
}
/* after :is() */
button:is(.focus, :focus) {
...
}
@Akryum
Akryum / example.js
Last active June 13, 2022 17:28
Vue Router - Navigate to parent named route
export default {
const parents = getNamedParents(this.$router.options.routes, this.$route.matched)
if (parents.length) {
return {
name: parents[parents.length - 1].name,
}
}
return { name: 'home' }
}
@almeidx
almeidx / markdown-text-101.md
Last active June 2, 2024 19:46 — forked from matthewzring/markdown-text-101.md
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

Sweet Styles

Italics *italics* or _italics_

Underline italics __*underline italics*__

@smiley
smiley / README.md
Last active July 19, 2024 23:33
How to make an automatic "stream's live" notification for your Discord server

Making an automatic Twitch -> Discord notification (using IFTTT)

So you went live and you want everyone to know. Here's how you do it:

Part 1 - Register on IFTTT

Go to https://ifttt.com/ and create an account (if you don't already have one)

Part 2 - Make a Discord Webhook

  • Find the Discord channel in which you would like to send Tweets.
  • In the settings for that channel, find the Webhooks option and create a new webhook. Note: This URL should be kept private. It allows anyone to write messages to that specific channel using that specific URL. Keep it safe!
@freak4pc
freak4pc / MKMultiPoint+Ext.swift
Last active September 5, 2024 06:36
Get a list of coordinates from a MKPolyline / MKRoute
public extension MKMultiPoint {
var coordinates: [CLLocationCoordinate2D] {
var coords = [CLLocationCoordinate2D](repeating: kCLLocationCoordinate2DInvalid,
count: pointCount)
getCoordinates(&coords, range: NSRange(location: 0, length: pointCount))
return coords
}
}
@alexnodejs
alexnodejs / async-calls
Created May 14, 2015 00:00
Wait for multiple async calls and do something after that (Swift)
let url = NSURL(string: "https://www.google.net")
let request = NSURLRequest(URL: url!)
let group = dispatch_group_create()
for index in 1...100 {
dispatch_group_enter(group)
NSURLConnection.sendAsynchronousRequest(request, queue: NSOperationQueue.mainQueue()) {(response, data, error) in
println("\(index) complete")
dispatch_group_leave(group)
}
@livibetter
livibetter / COPYING
Last active September 17, 2016 03:27
Check Twitch.tv live streams and videos
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <[email protected]>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@irazasyed
irazasyed / unzip.php
Created June 26, 2013 18:57
PHP: This code allows you to Unzip a ZIP file
<?php
function unzip($location,$new_location){
if(exec("unzip $location",$arr)){
mkdir($new_location);
for($i = 1;$i< count($arr);$i++){
$file = trim(preg_replace("~inflating: ~","",$arr[$i]));
copy($location."/".$file,$new_location."/".$file);
unlink($location."/".$file);
}
return true;