Skip to content

Instantly share code, notes, and snippets.

View DineshKachhot's full-sized avatar
🎯
Focusing

Dinesh Kachhot DineshKachhot

🎯
Focusing
View GitHub Profile
@klaaspieter
klaaspieter / ASS.md
Created June 22, 2017 07:59 — forked from anonymous/ASS.md
Acronyms Seriously Suck - Elon Musk

From time to time, Musk will send out an e-mail to the entire company to enforce a new policy or let them know about something that's bothering him. One of the more famous e-mails arrived in May 2010 with the subject line: Acronyms Seriously Suck:

There is a creeping tendency to use made up acronyms at SpaceX. Excessive use of made up acronyms is a significant impediment to communication and keeping communication good as we grow is incredibly important. Individually, a few acronyms here and there may not seem so bad, but if a thousand people are making these up, over time the result will be a huge glossary that we have to issue to new employees. No one can actually remember all these acronyms and people don't want to seem dumb in a meeting, so they just sit there in ignorance. This is particularly tough on new employees.

That needs to stop immediately or I will take drastic action - I have given enough warning over the years. Unless an acronym is approved by me, it should not enter the SpaceX glossary.

@fgilio
fgilio / axios-catch-error.js
Last active June 18, 2025 11:09
Catch request errors with Axios
/*
* Handling Errors using async/await
* Has to be used inside an async function
*/
try {
const response = await axios.get('https://your.site/api/v1/bla/ble/bli');
// Success 🎉
console.log(response);
} catch (error) {
// Error 😨
@sundeepgupta
sundeepgupta / create-fat-framework.sh
Last active December 16, 2024 20:58
Script to create a universal or "fat" binary for an iOS framework.
#!/bin/bash
# Adapted from http://stackoverflow.com/questions/24039470/xcode-6-ios-creating-a-cocoa-touch-framework-architectures-issues/26691080#26691080
# and https://gist.github.com/cromandini/1a9c4aeab27ca84f5d79
# Create a new aggregate target.
# For the automatically generated scheme, change its build config to "release".
# Ensure this target's "product name" build setting matches the framework's.
# Add a run script with `source "${PROJECT_DIR}/path_to_this_script`
@azamsharp
azamsharp / gist:4836d90bc50b7ad52c042a9bb9e92e46
Created January 11, 2017 20:41
View Controller Containment Injecting Empty Views
//: Playground - noun: a place where people can play
import UIKit
import PlaygroundSupport
typealias JSONDictionary = [String:Any]
struct Resource<T> {
let url :URL
@Morbix
Morbix / gist:41a2b835f05ea79407a88ce1b18ff76d
Created December 13, 2016 22:37
[iOS] Call Swift function inside Objective-C class
1. Add #import "MyFirstProjectOnSwift-Swift.h" in "MyObjectiveCLass.m"
2. Add @class mySwiftClass in MyObjectiveCLass.h;
3. Then in MyObjectiveCLass.m
mySwiftClass *myClass = [mySwiftClass new]; {Call Like This in any method wherever you want to call swift method.}
4. [myClass methodName];
Source: http://stackoverflow.com/questions/24078043/call-swift-function-from-objective-c-class
@Bhavdip
Bhavdip / sketch-never-ending.md
Created October 6, 2016 15:53
Modify Sketch to never ending trial

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com

127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com

@fabiomsr
fabiomsr / app_bar.dart
Last active January 2, 2019 12:52
Flutter flexible app bar
import 'package:flutter/material.dart';
class FlexibleAppBar extends SliverAppBar {
static const double height = 256.0;
FlexibleAppBar(String title, String imageUrl) : super(
pinned: true,
expandedHeight: height,
flexibleSpace: FlexibleSpaceBar(
title: Text(title),
@khanlou
khanlou / MD5StringTest.swift
Last active April 12, 2019 09:18
MD5 and SHA1 on String in Swift 3
import XCTest
@testable import <#project#>
class StringMD5Test: XCTestCase {
func testMD5() {
let string = "soroush khanlou"
XCTAssertEqual(string.md5, "954d741d14b14002d1ba88f600eee635")
@squarism
squarism / iterm2.md
Last active July 5, 2025 15:32
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@tsaqib
tsaqib / ideas.md
Last active May 31, 2025 19:03
Ideas that you can use for hackathons, competitions and research.

Ideas

I have collected and moderated these ideas from various public sources and put into one place so that problem solvers and solution developers may find inspirations. Because I wish to update it regularly, I have setup as a single page wiki. You may try these ideas on hackathons/competitions/research; some are quite intense problems and some are not. Many of the problems were prepared keeping Dhaka/Bangladesh in mind, but of course can be applied to just about any underdeveloped/developing and sometimes developed countries.

Categories:
  • Eradicate Extreme Poverty and Hunger
  • Education
  • Healthcare
  • Governance