Skip to content

Instantly share code, notes, and snippets.

@a-h
a-h / buildspec.yml
Last active November 3, 2022 08:31
Build Go with private dependencies on AWS CodeBuild
version: 0.2
env:
parameter-store:
build_ssh_key: "build_ssh_key"
phases:
install:
commands:
- mkdir -p ~/.ssh
# When using RN in combination with Cocoapods, a lot of
# things are broken. These are the fixes we had to append
# to our Podfile when upgrading to [email protected].
#
# WARNING: Check those line numbers when you're on a different version!
def change_lines_in_file(file_path, &change)
print "Fixing #{file_path}...\n"
contents = []
@mrkrndvs
mrkrndvs / export-named-sheet-as-csv.gs
Last active March 28, 2025 11:27 — forked from mderazon/export-to-csv.gs
Google apps script to export an individual sheet as csv file
/*
* script to export data of the named sheet as an individual csv files
* sheet downloaded to Google Drive and then downloaded as a CSV file
* file named according to the name of the sheet
* original author: Michael Derazon (https://gist.github.com/mderazon/9655893)
*/
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var csvMenuEntries = [{name: "Download Primary Time File", functionName: "saveAsCSV"}];
@hermanbanken
hermanbanken / RxLifecycle.md
Last active September 28, 2017 18:10
RxLifecycle

Adds 6 Observable fields on UIViewController:

Two main Observable<Bool>

  • rx_visible: did the controller appear/disappear?
  • rx_willBeVisible: will the controller appear/disappear?

And conveniently splitting those two out into Observable<Void>:

  • rx_willAppear
  • rx_willDisappear
  • rx_appear
@branflake2267
branflake2267 / JsInteropExportExample.java
Created August 23, 2016 22:19
A simple example using JsInterop to export for third party api use.
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.IsWidget;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Widget;
import com.sencha.gwt.jsinterop.examples.processor.Example;
import jsinterop.annotations.JsType;
/**
@gaearon
gaearon / connect.js
Last active April 22, 2025 06:40
connect.js explained
// connect() is a function that injects Redux-related props into your component.
// You can inject data and callbacks that change that data by dispatching actions.
function connect(mapStateToProps, mapDispatchToProps) {
// It lets us inject component as the last step so people can use it as a decorator.
// Generally you don't need to worry about it.
return function (WrappedComponent) {
// It returns a component
return class extends React.Component {
render() {
return (
@lopspower
lopspower / README.md
Last active April 22, 2025 06:44
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@muralikrishnat
muralikrishnat / app.js
Last active January 5, 2025 10:17
Achieving routing using pure Javascript
var App = {};
var addRoutes = function () {
$NB.addRoute('/books/:id', function (params) {
console.log('Route is ', params.Title, params.id);
}, 'books');
$NB.addRoute('/:category/:id', function (params) {
console.log('Route is ', params.Title, params.category, params.id);
}, 'category');
@evands
evands / combine_matching_static_libraries.sh
Created January 15, 2015 02:55
Combine libraries of matching names but different architectures from directory $1 and directory $2 # into directory $3.
#!/bin/sh
#
# Combine libraries of matching names but different architectures from directory $1 and directory $2
# into directory $3.
#
# Usage:
# => combine_matching_static_libraries.sh DIR_INPUT_1 DIR_INPUT_2 DIR_OUTPUT
######
pushd $1
@evands
evands / combine_static_libraries.sh
Created January 14, 2015 20:40
Combine multiple .a static libraries, which may each have multiple architectures, into a single static library
#!/bin/sh
# Combined all static libaries in the current directory into a single static library
# It is hardcoded to use the i386, armv7, and armv7s architectures; this can easily be changed via the 'archs' variable at the top
# The script takes a single argument, which is the name of the final, combined library to be created.
#
# For example:
# => combine_static_libraries.sh combined-library
#
# Script by Evan Schoenberg, Regular Rate and Rhythm Software