Skip to content

Instantly share code, notes, and snippets.

@berkorbay
berkorbay / github_desktop_ubuntu.md
Last active April 24, 2024 10:18
To install Github Desktop for Ubuntu

IMPORTANT

See the following links for further updates to Github Desktop for Ubuntu. These are official instructions. (also mentioned by fetwar on Nov 3, 2023)

For the sake of "maintaining the tradition" here is the updated version.

@Lessica
Lessica / build-idevicerestore.sh
Last active January 16, 2024 13:30
Build script for idevicerestore and all its dependencies for macOS.
#!/bin/sh
# Tested on macOS 12.0 / Xcode 13.3 / Homebrew 3.4.6-60-ge1c1157
# yum install python python-devel
# echo '[group_kdesig-cmake3_EPEL]
# name=Copr repo for cmake3_EPEL owned by @kdesig
# baseurl=https://copr-be.cloud.fedoraproject.org/results/@kdesig/cmake3_EPEL/epel-7-$basearch/
# type=rpm-md
# skip_if_unavailable=True
# gpgcheck=1
@sujeetkv
sujeetkv / npm-with-private-repo.md
Last active March 29, 2024 13:40
Use private repo as npm dependency.

Use private repo as npm dependency

Create Deploy-Token (Access-Token) for particular private repo and use it in dependency as following:

{
    "dependencies": {
        "package-name": "git+https://<username>:<access_token>@github.com/username/repository#{branch|tag}"
    }
}
#!/usr/bin/env bash
set -e
format_text=1
if [[ "$@" == *"--nofmt"* ]]; then
format_text=0
fi
image="$1"
@davidfrey
davidfrey / cfn-s3-queue-notification.yml
Created February 21, 2017 15:25
Cloud Formation: S3 Queue Notification
AWSTemplateFormatVersion: "2010-09-09"
Description: S3 Queue Notifications Test
Metadata:
AWS::CloudFormation::Interface:
ParameterGroups:
- Label:
default: Stack Variables
Parameters:
- Environment
- Label:
@cessationoftime
cessationoftime / ConfigurableAssets.scala
Last active January 10, 2017 22:59 — forked from drcharris/ConfigurableAssets.scala
Use different assets for different configurations with Play Framework
package controllers
import play.api.Play
import play.api.mvc.Action
import play.api.mvc.AnyContent
import com.google.inject.Inject
import play.api.http.HttpErrorHandler
class ConfigurableAssets @Inject() (playConfig: play.api.Configuration, errorHandler: HttpErrorHandler) extends AssetsBuilder(errorHandler) {
@ryanmaclean
ryanmaclean / sierra_boot_usb.sh
Last active May 6, 2017 21:07
Create macOS Sierra USB Installation Disk
#!/bin/bash
## The drive will need to be named "USB"
## It should be over 8GB large
sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/USB --applicationpath /Applications/Install\ macOS\ Sierra.app --nointeraction
@jherax
jherax / filterArray.js
Last active February 23, 2024 12:59
Filters an array of objects with multiple match-criteria.
/**
* Filters an array of objects using custom predicates.
*
* @param {Array} array: the array to filter
* @param {Object} filters: an object with the filter criteria
* @return {Array}
*/
function filterArray(array, filters) {
const filterKeys = Object.keys(filters);
return array.filter(item => {
@bmuschko
bmuschko / OfflineMavenRepository.groovy
Created December 4, 2015 04:58
Creating an offline Maven repository with Gradle
package org.gradle.training
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.OutputDirectory
import org.gradle.api.tasks.TaskAction
import org.gradle.api.DefaultTask
import org.gradle.util.GFileUtils
import org.gradle.api.artifacts.Configuration
import org.gradle.api.artifacts.component.ModuleComponentIdentifier
import org.gradle.maven.MavenModule
@MarioAriasC
MarioAriasC / spark.kt
Last active December 21, 2019 11:22
Word Count with Apache Spark and Kotlin
package org.cakesolutions.spark
import org.apache.spark.SparkConf
import org.apache.spark.api.java.JavaSparkContext
import scala.Tuple2
fun main(args: Array<String>) {
val inputFile = args[0]
val outputFile = args[1]