Skip to content

Instantly share code, notes, and snippets.

View andru255's full-sized avatar
🇵🇪
:)

Andrés Muñoz andru255

🇵🇪
:)
View GitHub Profile
#Sonic Pi Challenge #4 by Robin Newman
#I decided to generate my own binary string from text input
#which allows you to render any text here
#I liked initial code by theibbster at https://in-thread.sonic-pi.net/t/chord-progression-tool/4947
#I developed this and put the two ideas together below
use_debug false
use_random_seed 6148
L= "Robin Newman's Sonic Pi challenge #4" #the text input I used
S=[] #array to hold binary represention of the string L
L.bytes.to_a.each do |x| #convert to binary 7 bit numbers for each character
@tricsi
tricsi / package.json
Last active August 16, 2020 17:13
js13k build
{
"name": "js13kbuild",
"scripts": {
"start": "rollup -c -w",
"build": "rollup -c && cd build && html-minifier --collapse-whitespace --remove-tag-whitespace --minify-css true dev.html > index.html && advzip -a4 build.zip index.html",
},
"devDependencies": {
"@rollup/plugin-image": "^2.0.5",
"@rollup/plugin-typescript": "^5.0.2",
"@types/node": "^14.0.27",
@TheiOSDude
TheiOSDude / deleteSimApp.sh
Last active August 29, 2018 13:45
delete iOS app from booted simulator as a run script
xcrun simctl uninstall booted com.theiosdude.bundleid
@tarasowski
tarasowski / lambda-async-await.md
Last active July 22, 2023 04:47
#Lambda - Async/Await Rules
  1. The function after await someFunc() need to return a promise. Otherwise it will not await and exit from the function. The function below will simply exit and won't wait till the background process is finished. Since async functions are waiting for Promises. The keyword await makes JavaScript wait until that promise settles and returns its result.
const hello4 = () => setTimeout(() => console.log('Hello from Hello4'), 5000)

const asycFunc = async() => {
	await hello4()
    return
}
@samme
samme / phaser-scenes-summary.md
Last active August 2, 2023 16:26
Phaser 3 Scenes Summary

Scene control

Calls without a key argument

These affect the calling scene only.

Example:

this.scene.start()

@pvroosendaal
pvroosendaal / UIColor+Extensions.swift
Last active March 31, 2020 11:28
UIColor extension to work with hex strings (Swift 4)
//
// UIColor+Extensions.swift
// Roadmap
//
// Created by Paul van Roosendaal on 19/06/2018.
// Copyright © 2018 Roadmap. All rights reserved.
//
// Origin: https://gist.github.com/yannickl/16f0ed38f0698d9a8ae7
@benjaminmayo
benjaminmayo / ViewController.swift
Last active June 6, 2021 08:58
Working example of UIActivityItemProvider customising a shared URL depending on the activity type. http://benjaminmayo.co.uk/twitter-app-sharing-link-garbage
import UIKit
class ViewController : UIViewController {
// Monotonous view setup hidden. Imagine there's a button on screen that gets tapped and fires the action below.
@IBAction func shareLinkButtonPressed(_ sender: Any) {
let urlToShare = URL(string: "http://twitter.com/bzamayo")! // the base URL, in a real app this would be provided dynamically based on the current context
let sharingActivityItemProvider = LinkSharingActivityItemProvider(url: urlToShare) // make an activity item provider, defined below
let activityViewController = UIActivityViewController(activityItems: [sharingActivityItemProvider], applicationActivities: nil)
@isaacplmann
isaacplmann / table-of-contents.md
Last active April 22, 2024 03:36
Advanced Angular Patterns
@kharrison
kharrison / RSSFeed.swift
Last active September 1, 2021 01:59
Swift Decodable With Multiple Custom Dates
import Foundation
extension DateFormatter {
static let iso8601Full: DateFormatter = {
let formatter = DateFormatter()
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ"
formatter.calendar = Calendar(identifier: .iso8601)
formatter.timeZone = TimeZone(secondsFromGMT: 0)
formatter.locale = Locale(identifier: "en_US_POSIX")
return formatter
@cooljith91112
cooljith91112 / ie11-angular4-polyfills.ts
Last active August 30, 2022 18:59
Angular 4 IE11 Polyfills
let event;
if (document.createEvent) {
// IE11 - dispatch event doesn't support Event
event = document.createEvent('Event');
event.initEvent('input', true, true);
} else {
// Chrome
event = new Event('input');
}
this.el.nativeElement.dispatchEvent(event);