This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*.iml | |
/.idea/workspace.xml | |
/.idea/libraries | |
.DS_Store | |
# Built application files | |
*.apk | |
*.ap_ | |
# Files for the Dalvik VM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// usage: {{ payments | search:'info.holder':holderSearchKey }} | |
import { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({ | |
name: 'search', | |
pure: false | |
}) | |
export class SearchPipe implements PipeTransform { | |
transform<T>(value: T[], propertyKey: string, searchKey: string, ignoreCase: boolean = true): T[] { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def facebook | |
render_api 400, "Missing fields" and return unless check_params(facebook_params, [:id, :access_token]) | |
begin | |
facebook_user = FbGraph2::User.me(params[:access_token]).fetch(fields: [:name, :email, :gender, :birthday, "picture.height(300)"]) | |
user = User.find_by_email(facebook_user.email) | |
if user.nil? | |
# crate | |
meta = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ServiceGenerator { | |
private static ServiceGenerator instance = null; | |
private final String BASE_URL = AppParams.getInstance().API_URL; | |
private Context context = null; | |
private Retrofit.Builder builder = new Retrofit.Builder() | |
.baseUrl(BASE_URL) | |
.addCallAdapterFactory(RxJavaCallAdapterFactory.create()) | |
.addConverterFactory(GsonConverterFactory.create()); | |
private OkHttpClient.Builder httpClientBuilder = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// HttpClient.swift | |
// Secretvill | |
// | |
// Created by Jinkyou Son on 2017. 1. 6.. | |
// Copyright © 2017년 ultramarine. All rights reserved. | |
// | |
import Alamofire | |
import ReactiveKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tap "bbatsche/fisher" | |
brew "asdf" | |
brew "awscli" | |
brew "fish" | |
brew "fzf" | |
brew "git" | |
brew "mas" | |
brew "peco" | |
brew "thefuck" | |
brew "bbatsche/fisher/fisherman" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule DefinjectPlayground do | |
import Definject | |
# definject hello(who, opts \\ []) | |
# definject hello(name_list, _opts) when is_list(name_list), do: name_list |> Enum.map(& "Hello, #{&1}") | |
# definject hello(name, _opts) when is_binary(name), do: "Hello, #{name}" | |
def hello(who, opts \\ []) | |
def hello(name_list, _opts) when is_list(name_list), do: name_list |> Enum.map(& "Hello, #{&1}") | |
def hello(name, _opts) when is_binary(name), do: "Hello, #{name}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"date": "2023-02-11", | |
"report_coount": 7 | |
}, | |
{ | |
"date": "2023-02-10", | |
"report_coount": 11 | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule MyApp.Validation.IsNil do | |
use Ash.Resource.Validation | |
alias Ash.Error.Changes.{NoSuchAttribute, InvalidAttribute} | |
@impl true | |
def init(opts) do | |
{:ok, opts} | |
end | |
@impl true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Application.put_env(:sample, SamplePhoenix.Endpoint, | |
http: [ip: {127, 0, 0, 1}, port: 5001], | |
server: true, | |
live_view: [signing_salt: "aaaaaaaa"], | |
secret_key_base: String.duplicate("a", 64) | |
) | |
Mix.install([ | |
{:plug_cowboy, "~> 2.7"}, | |
{:jason, "~> 1.0"}, |
OlderNewer