Skip to content

Instantly share code, notes, and snippets.

@acquahsamuel
acquahsamuel / gist:7810ccdfaac2e2443131b99387298af8
Created August 13, 2023 09:09
List of all categories and subcategories for products and services
export const SubCategoriesList = [
{
letter: 'Vehicles',
names: [
'Cars',
'Motorcycles',
'Trucks & Trailers',
'Spare Parts & Accessories',
'Other Vehicles',
'Boats & Watercraft',
import axios from 'axios';
export const GET_POSTS_START = 'GET_POSTS_START';
export const GET_POSTS_SUCCESS = 'GET_POSTS_SUCCESS';
export const GET_POSTS_FAIL = 'GET_POSTS_FAIL';
const getPostsStart = () => ({
type: GET_POSTS_START,
});
@jonico
jonico / Jenkinsfile
Last active February 23, 2026 11:21
Example for a full blown Jenkins pipeline script with CodeQL analysis steps, multiple stages, Kubernetes templates, shared volumes, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, Docker containers, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, …
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, yaml: """
spec:
containers:
- name: mvn
image: maven:3.3.9-jdk-8
@vmasto
vmasto / twitter-react-redux-email.txt
Last active August 3, 2023 22:34 — forked from fat/email.txt
Twitter's React/Redux application architecture
Hey,
This is the redux video series that helped me learn how to use it: https://egghead.io/courses/getting-started-with-redux. And here's a section on react "stateless functions": https://facebook.github.io/react/docs/reusable-components.html#stateless-functions
Later you might want to play around with React Native
React Native for Web: https://github.com/necolas/react-native-web
Try it out here: http://codepen.io/necolas/pen/PZzwBR/?editors=0010
And I thought you might get some ideas from what we're doing for mobile.twitter.com, which is a bit like this...
@vasanthk
vasanthk / System Design.md
Last active April 1, 2026 03:48
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@mscharhag
mscharhag / Java8DateTimeExamples.java
Created February 24, 2014 19:53
Examples for using the Java 8 Date and Time API (JSR 310)
import java.time.*;
import java.time.format.DateTimeFormatter;
import java.time.format.FormatStyle;
import java.time.temporal.ChronoUnit;
import java.time.temporal.TemporalAdjusters;
import java.util.*;
import static java.time.temporal.TemporalAdjusters.*;
public class Java8DateTimeExamples {
@plentz
plentz / nginx.conf
Last active March 20, 2026 08:40
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@Atem18
Atem18 / gist:4696071
Last active April 19, 2024 11:18 — forked from evildmp/gist:3094281
Tutorial to seting up a django website in production.

Set up Django, Nginx and Gunicorn in a Virtualenv controled by Supervisor

Steps with explanations to set up a server using:

  • Virtualenv
  • Virtualenvwrapper
  • Django
  • Gunicorn
@Drubo
Drubo / video.js
Created January 7, 2012 09:38 — forked from anonymous/video.js
Node js on the fly video conversion
var child_process = require('child_process'),
sys = require('sys'),
http = require('http'),
parse = require('url').parse,
fs = require('fs');
var spawn = child_process.spawn;
var exec = child_process.exec;