Skip to content

Instantly share code, notes, and snippets.

@badsyntax
badsyntax / react-native-apple-m1.md
Last active March 11, 2024 18:25
Some tips to working with react-native 0.64 on an Apple M1 Silicon chip

My env:

  • cocoapods 1.10.1
  • xcode 12.4
  • macos big sur 11.2.3
  • react-native 0.64

iOS

The iOS simulator build won't "just work". If you get errors like ld: library not found for... or swift compiler errors, then you need to disable arm64 for the simulator build.

@480
480 / gist:3b41f449686a089f34edb45d00672f28
Last active August 21, 2025 12:03
MacOS X + oh my zsh + powerline fonts + visual studio code terminal settings

MacOS X + oh my zsh + powerline fonts + visual studio code (vscode) terminal settings

Thank you everybody, Your comments makes it better

Install oh my zsh

http://ohmyz.sh/

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
@eyecatchup
eyecatchup / node-cms.md
Last active December 20, 2024 16:11
[WIP] List of Node-based content management systems (CMS)
@dbirks
dbirks / certbot-systemd-ubuntu.md
Last active June 24, 2025 11:28
Certbot renew with a systemd timer on Ubuntu

Ubuntu 16.04

/etc/systemd/system/certbot.service

[Unit]
Description=Let's Encrypt renewal

[Service]
Type=oneshot
ExecStart=/usr/bin/certbot renew --quiet --agree-tos
import com.datatheorem.android.trustkit.TrustKit;
import com.datatheorem.android.trustkit.config.PublicKeyPin;
import javax.inject.Inject;
import okhttp3.CertificatePinner;
import okhttp3.OkHttpClient;
public class OkHttpCertPin {
private final TrustKit mTrustKit;
@JChudasama
JChudasama / ImageNotificationSample.java
Last active November 11, 2024 01:10
Android Image Notification Sample from URL (using Picasso) - Big Picture Style
final NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context)
.setContentTitle(context.getString(R.string.app_name))
.setSmallIcon(R.mipmap.ic_launcher)
.setContentText("notification with image")
.setContentIntent(resultPendingIntent)
.setPriority(Notification.PRIORITY_DEFAULT)
.setAutoCancel(true)
.setGroup(context.getString(R.string.app_name))
.setDefaults(defaults);
@nesquena
nesquena / PatternEditableBuilder.java
Last active October 21, 2022 10:20
PatternEditableBuilder - Easy way to create colored clickable spans within a TextView!
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.text.TextPaint;
import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
import android.view.View;
import android.widget.TextView;
import java.util.ArrayList;
import java.util.regex.Matcher;
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active September 1, 2025 17:09
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@max-te
max-te / youtube.js
Created September 17, 2012 15:56
Download Youtube-Video in node.js
var http = require('http')
var fs = require('fs')
var argv = require('optimist').argv
var rxVideoID = /v=([\]\[!"#$%'()*+,.\/:;<=>?@\^_`{|}~-\w]*)/
var link = argv._.toString()
var videoID = link.match(rxVideoID)[1]
http.get("http://www.youtube.com/get_video_info?video_id="+videoID, function(res) {
var chunks = []