Skip to content

Instantly share code, notes, and snippets.

View darzo27's full-sized avatar

D K darzo27

  • Johannesburg, South Africa
View GitHub Profile
@ccnokes
ccnokes / check-for-electron-apps.sh
Last active December 8, 2022 12:10
Bash script that checks for apps that use Electron. Detailed a bit more here: https://cameronnokes.com/blog/how-to-know-if-a-desktop-app-uses-electron/
#!/bin/bash
target="${1:-/Applications}"
check() {
stat "$1/Contents/Frameworks/Electron Framework.framework" &> /dev/null
if [[ $? = 0 ]]; then
echo "$1 uses Electron"
fi
}
@chris1111
chris1111 / TirmEnabler Catalina.command
Created July 20, 2019 01:53
Enable or Disable the Trim in macOS Catalina 10.15
#!/bin/bash
# Simple script by chris1111
# Vars
apptitle="Trim Enabler Catalina"
version="1.0"
# Set Icon directory and file
iconfile="/System/Library/CoreServices/Expansion Slot Utility.app/Contents/Resources/AppIcon.icns"
# Select Trim Choice
@branflake2267
branflake2267 / AppDelegate.m
Created April 15, 2018 21:02
Flutter - Native Platform Interactions - Code for the youtube video.
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GeneratedPluginRegistrant registerWithRegistry:self];
// Override point for customization after application launch.
FlutterViewController* controller = (FlutterViewController*)self.window.rootViewController;
@hjeffrey
hjeffrey / Install_ipa_to_simulator.scpt
Last active April 27, 2021 16:10
Install ipa to Simulator of Xcode
--
-- Project: Install IPA to Simulator
-- Author: Jeffrey Jia
-- Date: 2017 年 9 月 26 日
--
on open fileList
repeat with theFilePath in fileList
set fileInfo to info for file theFilePath
if name of fileInfo ends with ".ipa" then
@darzo27
darzo27 / TwitterTimeline
Created August 2, 2017 15:01
Displaying User Twitter Timeline in div element
<html>
<!-- Twitter’s widgets JavaScript For optimal web page performance & tracking widget JS events -->
<script>window.twttr = (function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0],
t = window.twttr || {};
if (d.getElementById(id)) return t;
js = d.createElement(s);
js.id = id;
js.src = "https://platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js, fjs);
@jacobscarter
jacobscarter / server.js
Created June 22, 2017 20:19
Your Node Application for Twitter Node Client - Blog Post
//importing Twitter JS Client dependancy
module.exports = require('./lib/Twitter');
// VARIBALES
var express = require('express');
var OAuth2 = require('oauth').OAuth2;
var https = require('https');
var app = express();
var bodyParser = require('body-parser');
@darzo27
darzo27 / AngularHTMLBinding.html
Created April 7, 2017 22:05
Angular 2 HTML binding using expressions. View on JSFiddle: https://jsfiddle.net/DARZO27/01q4jeht/2/
<!--View on JSFiddle: https://jsfiddle.net/DARZO27/01q4jeht/2/-->
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-sanitize.js"></script>
<body>
<div ng-app="myApp" ng-controller="myCtrl">
<p ng-bind-html="myText"></p>
@barbietunnie
barbietunnie / udemy-courses-download-using-cookies.md
Last active May 10, 2024 18:17
Downloading Udemy videos with youtube-dl

How to download your Udemy course videos using youtube-dl

$ youtube-dl --list-extractors | grep udemy

Steps

  1. Get link to the course to download. e.g. https://www.udemy.com/course-name/
  2. Login into udemy website, save the cookie from chrome using Chrome (Cookie.txt)[1] export extension. Save it to file udemy-cookies.txt
  3. Get the link of the video that you want to download. usually in format. Use the command provided below where you have to replace the {course_link} and {path_to_cookies_file} with respective paths.
$ youtube-dl {course_link} --cookies {path_to_cookies_file}
@kalimar
kalimar / iterm2Badges.md
Last active June 30, 2022 13:27
How to add a badge to iterm2 on Zsh

Custom Badges in iTerm2

iTerm2 - the popular terminal emulator for OSX has added some really neat features. One of those, is badges. From the documentation: A badge is a large text label that appears in the top right of a terminal session to provide dynamic status, such as the current host name or git branch.

I had some trouble figuring out how to build a badge so I wanted to share a quick walk-through. Thanks to Chris Mar for teaching me.

Install shell integrations on iTerm.

Easy enough - it's an option on the dropdown menu