Skip to content

Instantly share code, notes, and snippets.

View adityadaniel's full-sized avatar
🛠️

Daniel Aditya Istyana adityadaniel

🛠️
View GitHub Profile
@xtabbas
xtabbas / SnapCarousel.swift
Created May 10, 2020 18:13
A carousel that snap items in place build on top of SwiftUI
//
// SnapCarousel.swift
// prototype5
//
// Created by xtabbas on 5/7/20.
// Copyright © 2020 xtadevs. All rights reserved.
//
import SwiftUI
@manishpathak99
manishpathak99 / xcode-downloader.rb
Created October 30, 2017 09:10 — forked from iandundas/xcode-downloader.rb
Script for reliably downloading binaries (e.g. Xcode) from Apple's CDN
#!/usr/bin/env ruby
print "What is the URL of your Apple Downloads resource?\nURL:"
url = gets.strip
print "What is the ADCDownloadAuth cookie token:\nADCDownloadAuth: "
token = gets.strip
command = "aria2c --header \"Host: adcdownload.apple.com\" --header \"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\" --header \"Upgrade-Insecure-Requests: 1\" --header \"Cookie: ADCDownloadAuth=#{token}\" --header \"User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_1 like Mac OS X) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0 Mobile/14B72 Safari/602.1\" --header \"Accept-Language: en-us\" -x 16 -s 16 #{url} -d ~/Downloads"

bazel query cheatsheet

which packages depend on qtdb lib?

bazel query 'rdeps(..., //vistar/geo/qtdb:go_default_library)' --output package 

which packages does qtdb depend on?

@nrollr
nrollr / MongoDB_macOS_Sierra.md
Last active April 1, 2024 16:23
Install MongoDB on Sierra using Homebrew

Install MongoDB on macOS Sierra

This procedure explains how to install MongoDB using Homebrew on macOS Sierra 10.12.
Official MongoDB install documentation: here

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@leearmstrong
leearmstrong / Add Screen Recorder Button.py
Created February 28, 2016 17:37 — forked from BenjyWiener/Add Screen Recorder Button.py
Screen recorder for Pythonista
# coding: utf-8
from objc_util import *
from UIKit import *
from Foundation import *
from ReplayKit import *
from console import alert
def main():
rootVC = UIApplication.sharedApplication().keyWindow().rootViewController()
@BenjyWiener
BenjyWiener / Add Screen Recorder Button.py
Last active September 15, 2017 08:06
Screen recorder for Pythonista
# coding: utf-8
from objc_util import *
from ReplayKit import *
from console import alert
import ui
UIBarButtonItem = ObjCClass('UIBarButtonItem')
def main():
@massawho
massawho / .gitignore
Last active July 8, 2018 06:12
.gitignore Django projects
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
@fyk
fyk / SaveAppIconFromAppStore.py
Last active April 22, 2016 01:34
SaveAppIconFromAppStore.py(Pythonista)
import re, os
import urllib
import ImageFile
import photos
import clipboard
from bs4 import BeautifulSoup
from PIL import Image
def download_from(url):
print("get content from " + url)
@ttscoff
ttscoff / image_re.m
Created November 6, 2014 17:18
Regex for Markdown images
@"(?:\\(|:\\s+)(?!http)([^\\s]+\\.(?:jpe?g|gif|png|svg|pdf))"
# matches local images:
# matches "(image.png)"
# matches "]: image.png"
# does not match remote images (http*)
@drdrang
drdrang / Pair.py
Created October 14, 2014 16:14
Pythonista script for putting two screenshots side by side.
import Image
import photos, speech, console
speech.say('left image?', '', .18)
s1 = photos.pick_image()
speech.say('right image?', '', .18)
s2 = photos.pick_image()
w = s1.size[0] + s2.size[0] + 60
h = max(s1.size[1], s2.size[1]) + 40